From: Florian Schmaus Date: Fri, 6 Sep 2013 15:41:10 +0000 (+0200) Subject: Don't get iw version from git if there is no .git/ X-Git-Tag: v3.13~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0dc6755d97e5add4ef23266a30fb8bdee5ca129;p=thirdparty%2Fiw.git Don't get iw version from git if there is no .git/ The version.sh script should only try to get the version from git if the source actually resides in a git repository, i.e. .git/ exists. Doing otherwise in a non-git source repo results in git ascending until it finds a .git directory, which will cause problems in some source-based distributions ( https://bugs.gentoo.org/show_bug.cgi?id=482334 ). --- diff --git a/version.sh b/version.sh index 80e55ab..0f1aa1d 100755 --- a/version.sh +++ b/version.sh @@ -3,7 +3,7 @@ VERSION="3.11" OUT="$1" -if head=`git rev-parse --verify HEAD 2>/dev/null`; then +if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then git update-index --refresh --unmerged > /dev/null descr=$(git describe)