generate-version.sh 209 B

1234567891011121314
  1. #!/bin/sh
  2. set -e
  3. if [ -d .git ] ; then
  4. version="$(git describe --dirty)"
  5. elif [ -f version ] ; then
  6. version="$(cat version)"
  7. else
  8. version="unknown"
  9. fi
  10. echo "#define BABELD_VERSION \"$version\""