Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=3d819bf4c4c8d5e387959de100b7399ac949154c

commit 3d819bf4c4c8d5e387959de100b7399ac949154c
Author: James Buren <[email protected]>
Date:   Tue Oct 16 18:09:39 2012 -0500

kerneldiff: add new tool for diffing kernel package

diff --git a/tools/kerneldiff b/tools/kerneldiff
new file mode 100755
index 0000000..d2f297c
--- /dev/null
+++ b/tools/kerneldiff
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+if [ -z "$2" ]; then
+       echo "Usage: $0 <old fpm> <new fpm>"
+       exit 1
+fi
+
+_set_fpm()
+{
+    if echo $1 | grep -q '^/'; then
+        echo $1
+    else
+        echo $(pwd)/$1
+    fi
+}
+
+_work_dir()
+{
+       cd $1
+       tar -xf $2 .FILELIST
+  sed -i -r 's|^(lib/modules/)[0-9.]+-fw[0-9]+/?|\1|' .FILELIST
+  mv .FILELIST contents
+}
+
+FPM1=`_set_fpm "$1"`
+FPM2=`_set_fpm "$2"`
+
+if [ ! -f "$FPM1" -o ! -f "$FPM2" ]; then
+       echo "One of the fpms does not exist."
+       exit 1
+fi
+
+DIR1="$(mktemp -u)"
+DIR2="$(mktemp -u)"
+
+mkdir -p "$DIR1" "$DIR2"
+
+_work_dir "$DIR1" "$FPM1"
+
+_work_dir "$DIR2" "$FPM2"
+
+diff -ur "$DIR1/contents" "$DIR2/contents"
+
+rm -rf "$DIR1" "$DIR2"
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to