diff --git a/cnf/mkversionheader.sh b/cnf/mkversionheader.sh index a31a69f095..96df4a6dea 100755 --- a/cnf/mkversionheader.sh +++ b/cnf/mkversionheader.sh @@ -4,11 +4,12 @@ TMP="$1".tmp DST="$1" # Determine build version and date -GAP_BUILD_VERSION=`git describe --tags --dirty || echo` -GAP_BUILD_DATE=`date +"%Y-%m-%d %H:%M:%S (%Z)"` -if test x"${GAP_BUILD_VERSION}" = x ; then +if test -d ../.git ; then + GAP_BUILD_VERSION=`git describe --tags --dirty || echo` +else GAP_BUILD_VERSION=unknown fi +GAP_BUILD_DATE=`date +"%Y-%m-%d %H:%M:%S (%Z)"` # Generate the file cat > "$TMP" < needint then # kernel newer