scmversion: Fix generation on Macs
This commit is contained in:
parent
b581cc4777
commit
73a80d3a1d
|
@ -3,7 +3,12 @@
|
|||
VERSION_FILE="scmversion.cpp"
|
||||
|
||||
CURDIR=$(pwd)
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
cd "$(dirname $(python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0"))"
|
||||
else
|
||||
cd $(dirname $(readlink -f $0))
|
||||
fi
|
||||
|
||||
|
||||
HASH=$(git rev-parse HEAD)
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD | tr -d '\r\n')
|
||||
|
|
Loading…
Reference in New Issue