diff --git a/bin/load-world.sh b/bin/load-world.sh index 8b8c2ebee5f0287f48095ed10c78e318878f8c89..1aa89ba5f28edcf312503353d0dd571393ec3a41 100755 --- a/bin/load-world.sh +++ b/bin/load-world.sh @@ -11,8 +11,10 @@ usage() SKIP_PCL= NO_PCL_FEATURE= -# Default version is the date with the git hash. -GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`" +# Default version is the date with the git hash. Older versions of +# git don't support --dirty, but the output in that case is what we +# want (except for ending with "dirty"), so we're set. +GIT_HASH="`(cd src; git describe --dirty 2>/dev/null || git describe 2>/dev/null)`" # If the git hash looks like a snapshot tag or release, don't add the date. VERSION="`date '+%Y-%m-%d %H:%M:%S'`${GIT_HASH:+ $GIT_HASH}"