You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
384 B

  1. #!/bin/sh
  2. GIT=$(which git)
  3. if [ "${GIT}" = "" ]; then
  4. exit 0
  5. fi
  6. VERSION=$(git describe --always --tags --dirty)
  7. if [ $? -ne 0 ]; then
  8. exit 0
  9. fi
  10. echo -n "${VERSION}" > VERSION
  11. grep -q \"${VERSION}\" src/version.hpp
  12. RV=$?
  13. if [ $RV -ne 0 ]; then
  14. echo "#pragma once" > src/version.hpp
  15. echo "static const char MERGERFS_VERSION[] = \"${VERSION}\";" >> src/version.hpp
  16. fi