From: Yves Orton Date: Sun, 21 Dec 2008 17:49:27 +0000 (+0100) Subject: smarter make_patchnum.sh, get the .patchnum from the .patch file if it exists X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ba4bb01ebc0497918a1b1428e4135e7b0e9c40b6;p=p5sagit%2Fp5-mst-13.2.git smarter make_patchnum.sh, get the .patchnum from the .patch file if it exists --- diff --git a/make_patchnum.sh b/make_patchnum.sh index 2306fa8..d3c9441 100644 --- a/make_patchnum.sh +++ b/make_patchnum.sh @@ -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"