diff options
-rw-r--r-- | quilt.changes | 7 | ||||
-rw-r--r-- | quilt/scripts/inspect.in | 26 |
2 files changed, 29 insertions, 4 deletions
diff --git a/quilt.changes b/quilt.changes index af322ca..e66eac5 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Feb 16 09:06:01 CET 2006 - agruen@suse.de + +- quilt/scripts/inspect.in: Also recognize when tar is passed a + filename on the command line -- in this case, md5sum will add + a `*' in fromt of thw filename, which indicates a binary file. + +------------------------------------------------------------------- Thu Feb 16 08:35:17 CET 2006 - agruen@suse.de - quilt/scripts/inspect.in: Add default value for QUILT_DIR so diff --git a/quilt/scripts/inspect.in b/quilt/scripts/inspect.in index 8587c88..172b3b1 100644 --- a/quilt/scripts/inspect.in +++ b/quilt/scripts/inspect.in @@ -101,7 +101,7 @@ cat <<-'EOF' > $tmpdir/bin/wrapper do if [ $md5sum = $md5sum_ ] then - echo $file_ + echo ${file_#\*} return 0 fi done < $tmpdir/md5sums @@ -120,7 +120,7 @@ cat <<-'EOF' > $tmpdir/bin/wrapper do if [ $md5sum = $md5sum_ ] then - echo $file_ + echo ${file_#\*} return 0 fi done < $tmpdir/more-md5sums @@ -141,7 +141,7 @@ cat <<-'EOF' > $tmpdir/bin/wrapper fi } - input_option() { + patch_input_file() { while [ $# -gt 0 ]; do case "$1" in -i|--input) @@ -164,9 +164,27 @@ cat <<-'EOF' > $tmpdir/bin/wrapper return 1 } + tar_input_file() { + while [ $# -gt 0 ]; do + if [ -e "$1" ] + then + echo "$1" + return + fi + shift + done + } + tmpdir=${RPM_BUILD_DIR%/*} rm -f $tmpdir/data - inputfile=$(input_option "$@") + case "${0##*/}" in + patch) + inputfile=$(patch_input_file "$@") + ;; + tar) + inputfile=$(tar_input_file "$@") + ;; + esac if [ -z "$inputfile" ]; then # put data from stdin into tmpfile cat > $tmpdir/data |