diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-09-17 23:56:07 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-09-17 23:56:07 +0000 |
commit | 2d3a503aa8651215e7bb939b995c33356bbce913 (patch) | |
tree | 87e9f0b8121e6e93e3e79af47f6fc8a471c17e38 /scripts | |
parent | a267b29dbe851b647643d2026cf39de85c5b11f4 (diff) | |
download | quilt-2d3a503aa8651215e7bb939b995c33356bbce913.tar.gz |
- Merge compatibility layer from John Vandenberg <jayvdb@gmail.com>.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/patchfns.in | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/scripts/patchfns.in b/scripts/patchfns.in index 89fd216..2e0b9b0 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -23,6 +23,13 @@ DB_VERSION=2 : ${QUILT_PATCHES:=patches} : ${QUILT_PC:=.pc} +# Support compatibility layer +if [ -r @QUILT@/compat/compatfns ] +then + source @QUILT@/compat/compatfns +fi + +export PATH="@QUILT@/compat:$PATH" unset CDPATH shopt -s dotglob @@ -644,39 +651,6 @@ in_array() gen_tempfile() { - # This is a substitute for the mktemp executable. - internal_mktemp() - { - local try n - if [ x"$1" = x"-d" ] - then - for ((n=0 ; $n<100 ; n++)) - do - try=${2%XXXXXX}$RANDOM - mkdir -m 700 $try 2>/dev/null \ - && break - done - else - local user_mask=$(umask) - umask 077 - set -o noclobber - for ((n=0 ; $n<100 ; n++)) - do - try=${1%XXXXXX}$RANDOM - echo -n "" 2> /dev/null > $try \ - && break - done - set +o noclobber - umask $user_mask - fi - if [ $n -lt 100 ] - then - echo $try - else - return 1 - fi - } - local name if [ "$1" = -d ] then |