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