scripts/getver.sh: simplify revision calculation