diff --git a/package/gluon-autoupdater/Makefile b/package/gluon-autoupdater/Makefile index 93b08067..046a1bcb 100644 --- a/package/gluon-autoupdater/Makefile +++ b/package/gluon-autoupdater/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gluon-autoupdater PKG_VERSION:=0.1 -PKG_RELEASE:=1.$(GLUON_CONFIG_VERSION) +PKG_RELEASE:=1.$(GLUON_CONFIG_VERSION)$(if $(GLUON_BRANCH),.$(GLUON_BRANCH)) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) @@ -29,7 +29,7 @@ define Package/gluon-autoupdater/install $(CP) ./files/* $(1)/ $(INSTALL_DIR) $(1)/lib/gluon/upgrade/autoupdater/invariant - $(GLUON_CONFIGURE) invariant.pl > $(1)/lib/gluon/upgrade/autoupdater/invariant/010-autoupdater + GLUON_BRANCH='$(GLUON_BRANCH)' $(GLUON_CONFIGURE) invariant.pl > $(1)/lib/gluon/upgrade/autoupdater/invariant/010-autoupdater chmod +x $(1)/lib/gluon/upgrade/autoupdater/invariant/010-autoupdater endef diff --git a/package/gluon-autoupdater/invariant.pl b/package/gluon-autoupdater/invariant.pl index c6bb3b72..7c5a0a5c 100644 --- a/package/gluon-autoupdater/invariant.pl +++ b/package/gluon-autoupdater/invariant.pl @@ -1,18 +1,16 @@ my $cfg = $CONFIG->{autoupdater}; -print <<'END'; +my $branch = $ENV{GLUON_BRANCH} || $cfg->{branch}; +my $enabled = $ENV{GLUON_BRANCH} ? 1 : 0; + +print <{$_}\n"; -} - -print <<'END'; +set autoupdater.settings.branch=$branch +set autoupdater.settings.enabled=$enabled EOF }