Second attempt at pull from upstream package/{luci,system,utils}
[librecmc/librecmc.git] / package / luci / luci.mk
index 69aecaa250578a821665e186244dfa53026fa66f..137886f1b322c75655a0276c03cfd63ed86b1aa7 100644 (file)
@@ -70,7 +70,8 @@ PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \
 PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \
        variant="LuCI"; \
        if git log -1 >/dev/null 2>/dev/null; then \
-               branch="$$(git symbolic-ref --short -q HEAD 2>/dev/null)"; \
+               branch="$$(git branch --remote --verbose --no-abbrev --contains 2>/dev/null | \
+                       sed -rne 's|^[^/]+/([^ ]+) [a-f0-9]{40} .+$$|\1|p' | head -n1)"; \
                if [ "$$branch" != "master" ]; then \
                        variant="LuCI $$branch branch"; \
                else \