smarter make_patchnum.sh, get the .patchnum from the .patch file if it exists
Yves Orton [Sun, 21 Dec 2008 17:49:27 +0000 (18:49 +0100)]
make_patchnum.sh

index 2306fa8..d3c9441 100644 (file)
@@ -1,7 +1,11 @@
 #!/bin/sh
 
 Existing=`cat .patchnum 2>/dev/null`
-Current=`git describe`
+if [ -e ".patch" ]; then
+       Current=`awk '{print $4}' .patch`
+else
+       Current=`git describe`
+fi
 
 if [ "$Existing" != "$Current" ]; then
        echo "Updating .patchnum"