X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=scripts%2Fsetlocalversion;h=057b6b3c5dfb4cf0677add9a7c6f04c5029d2e15;hb=8558f59edf935cf5ee5ffc29a9e9458fd9a71be1;hp=e90a91cc5185709d31a9a128b4790b676a35599e;hpb=75a1e32cce30ab1c5a361ebae24a18753e42feaa;p=cascardo%2Flinux.git diff --git a/scripts/setlocalversion b/scripts/setlocalversion index e90a91cc5185..057b6b3c5dfb 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -43,7 +43,7 @@ scm_version() fi # Check for git and a git repo. - if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + if test -d .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore # it, because this version is defined in the top level Makefile. @@ -85,7 +85,7 @@ scm_version() fi # Check for mercurial and a mercurial repo. - if hgid=`hg id 2>/dev/null`; then + if test -d .hg && hgid=`hg id 2>/dev/null`; then tag=`printf '%s' "$hgid" | cut -s -d' ' -f2` # Do we have an untagged version?