version.sh 143 B

123456789
  1. #!/bin/sh
  2. hash=$(git --git-dir="$(dirname $0)/.git" rev-parse --short HEAD 2>/dev/null)
  3. if [ -n "$hash" ]
  4. then
  5. printf '+g%s' "$hash"
  6. fi
  7. echo