]> git.pld-linux.org Git - packages/chromium-browser.git/blobdiff - make-diff-patch.sh
up to 43.0.2357.52
[packages/chromium-browser.git] / make-diff-patch.sh
index e7845b5148d743b1308167cae9589f05457d9fc2..a2c7f5d6a6fb493042ae09e3e937256bcda785a1 100755 (executable)
@@ -2,7 +2,6 @@
 # Create .patch based on $1 for $2
 src=$1
 dst=$2
-ext=.tar.xz
 
 unpack() {
        case "$1" in
@@ -25,19 +24,21 @@ done
 
 set -e
 
-srcdir=$(basename $src $ext)
-dstdir=$(basename $dst $ext)
+srcdir=$(basename ${src%.tar.*})
+dstdir=$(basename ${dst%.tar.*})
 patch=$dstdir.patch
 
 test -d $srcdir || unpack $src
 test -d $dstdir || unpack $dst
 if diff -Nur $srcdir $dstdir > $patch; then
        echo "No diffs!"
+       rm $patch
 else
        echo "Patch created"
        ls -lh $patch
        diffstat $patch | tee $patch.diff
        cat $patch.diff $patch | xz -9 > $patch.xz
+       rm $patch.diff $patch
 fi
 
 rm -rf $dstdir $srcdir
This page took 0.027778 seconds and 4 git commands to generate.