Skip to content

Commit

Permalink
Merge pull request #492 from vbraun/better_version
Browse files Browse the repository at this point in the history
Better handling of version when inside git repo
  • Loading branch information
markuspf committed Feb 6, 2016
2 parents 570594f + 951b812 commit e6576c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cnf/mkversionheader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" <<EOF
Expand Down
2 changes: 2 additions & 0 deletions lib/init.g
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ CallAndInstallPostRestore( function()
haveint[i]:= IntHexString( have[i] );
needint[i]:= IntHexString( need[i] );
od;
Print( "Current kernel version: ", haveint[1], ".", haveint[2], ".", haveint[3], "\n" );
Print( "Library requires version: ", needint[1], ".", needint[2], ".", needint[3], "\n" );

if haveint > needint then
# kernel newer
Expand Down

0 comments on commit e6576c1

Please sign in to comment.