scripts/getver.sh: try to get branch/upstream automatically