Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=0743ef4c3f8b20e21a74be9743b4f38708bab0c0

commit 0743ef4c3f8b20e21a74be9743b4f38708bab0c0
Author: James Buren <[email protected]>
Date:   Fri Mar 23 12:29:07 2012 -0500

fix initrddiff to work properly with fpms from the current directory

diff --git a/tools/initrddiff b/tools/initrddiff
index 5009884..1ad3a17 100755
--- a/tools/initrddiff
+++ b/tools/initrddiff
@@ -5,10 +5,14 @@ if [ -z "$2" ]; then
exit 1
fi

-if [ ! -f "$1" -o ! -f "$2" ]; then
-       echo "One of the fpms does not exist."
-       exit 1
-fi
+_set_fpm()
+{
+    if echo $1 | grep -q '^/'; then
+        echo $1
+    else
+        echo $(pwd)/$1
+    fi
+}

_work_dir()
{
@@ -17,8 +21,13 @@ _work_dir()
xz -d < boot/initrd | cpio -t | sort -u | sed -r 
's|^(lib/modules/)[0-9.]+-fw[0-9]+/|\1|' > contents
}

-FPM1="$1"
-FPM2="$2"
+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)"
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to