github.com/slspeek/camlistore_namedsearch@v0.0.0-20140519202248-ed6f70f7721a/misc/gitversion (about) 1 #!/bin/sh 2 3 ver=$(git show --pretty=format:'%ad-%h' --abbrev-commit --date=short | head -1) 4 git diff --exit-code >/dev/null || ver=$ver+ 5 echo $ver 6