scripts/getver.sh: allow conversion between git hash and revision