quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH 2/3] inspect-wrapper: Change original_file() paramete


From: Jean Delvare
Subject: [Quilt-dev] [PATCH 2/3] inspect-wrapper: Change original_file() parameter
Date: Wed, 03 Jun 2015 14:02:39 +0200

Pass the md5sum instead of the file name to original_file(). This
will allow for further optimization in fast mode.
---
 quilt/scripts/inspect-wrapper.in |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/quilt/scripts/inspect-wrapper.in
+++ b/quilt/scripts/inspect-wrapper.in
@@ -3,10 +3,8 @@
 # find original data file by md5sum
 original_file()
 {
-       local file=$1 md5sum
+       local md5sum=$1
 
-       set -- $(md5sum < $file)
-       md5sum=$1
        while read md5sum_ file_
        do
                if [ "$md5sum" = "$md5sum_" ]
@@ -248,7 +246,8 @@ then
 else
        # put data from stdin into tmpfile
        cat > $tmpdir/data
-       unpackfile=$(original_file $tmpdir/data)
+       md5sum=$(md5sum < $tmpdir/data)
+       unpackfile=$(original_file $md5sum)
        if [ $? -ne 0 ]
        then
                # Report problem to the caller

-- 
Jean Delvare
SUSE L3 Support




reply via email to

[Prev in Thread] Current Thread [Next in Thread]