dnsmasq: clean up white space in dnsmasq.init
[openwrt/staging/lynxis/omap.git] / scripts / getver.sh
index e718485852d427300892f412dba320a494a1c23f..ecf048f4c1c88b308295e5d9d79e34bc2f70a12e 100755 (executable)
@@ -33,14 +33,14 @@ try_git() {
                        UPSTREAM_BASE="$(git merge-base $GET_REV $ORIGIN)"
                        UPSTREAM_REV="$(git rev-list ${REBOOT}..$UPSTREAM_BASE | wc -l | awk '{print $1}')"
                else
-                       UPSTREAM_REV=$REV
+                       UPSTREAM_REV=0
                fi
 
                if [ "$REV" -gt "$UPSTREAM_REV" ]; then
                        REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
                fi
 
-               REV="${REV:+r$REV}"
+               REV="${REV:+r$REV-$(git log --format="%h" -1)}"
                ;;
        esac