summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-02-16 08:08:47 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-02-16 08:08:47 +0000
commit025c3d44cb30d7c3a909d44b22b8eb6fd4ad8295 (patch)
tree683b02a60cbeaf8790a80c02a00b768d6e9d75d3
parent3fdc8f7f91557a94722ef73e9f41a1f682cca4a3 (diff)
downloadquilt-025c3d44cb30d7c3a909d44b22b8eb6fd4ad8295.tar.gz
- 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.
-rw-r--r--quilt.changes7
-rw-r--r--quilt/scripts/inspect.in26
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