From 5d67b7c1bb0cbf5550449756877ecae1a15101f8 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Thu, 8 Dec 2005 16:46:14 +0000 Subject: - 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. --- scripts/inspect.in | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'scripts') 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 -- cgit