]> git.pld-linux.org Git - packages/chromium-browser.git/commitdiff
script to create diff patches between versions
authorElan Ruusamäe <glen@delfi.ee>
Sat, 3 Nov 2012 09:27:01 +0000 (11:27 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 3 Nov 2012 09:27:01 +0000 (11:27 +0200)
make-diff-patch.sh [new file with mode: 0755]

diff --git a/make-diff-patch.sh b/make-diff-patch.sh
new file mode 100755 (executable)
index 0000000..c32e161
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Create .patch based on $1 for $2
+src=$1
+dst=$2
+ext=.tar.xz
+
+set -e
+
+srcdir=$(basename $src $ext)
+dstdir=$(basename $dst $ext)
+patch=$dstdir.patch
+
+test -d $srcdir || unpack $src
+test -d $dstdir || unpack $dst
+if diff -Nur $srcdir $dstdir > $patch; then
+       echo "No diffs!"
+else
+       echo "Patch created"
+       ls -lh $patch
+       diffstat $patch | tee $patch.diff
+       cat $patch.diff $patch | xz -9 > $patch.xz
+fi
+
+rm -rf $dstdir $srcdir
This page took 0.194909 seconds and 4 git commands to generate.