diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-12-08 16:46:14 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-12-08 16:46:14 +0000 |
commit | 5d67b7c1bb0cbf5550449756877ecae1a15101f8 (patch) | |
tree | 53015310e6b8934cc5f1a65ee3820b2c17457a38 /scripts/inspect.in | |
parent | 10fc7b66402be353d3bac4a10d08838f6eba9701 (diff) | |
download | quilt-5d67b7c1bb0cbf5550449756877ecae1a15101f8.tar.gz |
- scripts/inspect.in (setup command): add heuristic to check for
input files specified on the command line in the tar/patch
wrapper.
- quilt/diff.in: Degrade the ``More recent patches modify files
in patch'' message to a warning.
Diffstat (limited to 'scripts/inspect.in')
-rw-r--r-- | scripts/inspect.in | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/inspect.in b/scripts/inspect.in index 83f2db3..5de5009 100644 --- a/scripts/inspect.in +++ b/scripts/inspect.in @@ -139,11 +139,20 @@ cat <<-'EOF' > $tmpdir/bin/wrapper fi } - # put data into tmpfile + for file in "$@"; do + if [ -e "${file#-i}" ]; then + inputfile=${file#-i} + break + fi + done tmpdir=${RPM_BUILD_DIR%/*} - cat > $tmpdir/data + rm -f $tmpdir/data + if [ -z "$inputfile" ]; then + # put data from stdin into tmpfile + cat > $tmpdir/data + fi - unpackfile="$(original_file $tmpdir/data)" + unpackfile="$(original_file ${inputfile:-$tmpdir/data})" if [ -n "$unpackfile" ] then dir=${PWD/$RPM_BUILD_DIR} @@ -163,7 +172,11 @@ cat <<-'EOF' > $tmpdir/bin/wrapper fi PATH=${PATH#*:} - ${0##*/} "$@" < $tmpdir/data + if [ -n "$inputfile" ]; then + ${0##*/} "$@" + else + ${0##*/} "$@" < $tmpdir/data + fi EOF chmod 755 $tmpdir/bin/wrapper ln -s wrapper $tmpdir/bin/patch |