Add make target to check out modules

This commit is contained in:
Matthias Schiffer 2013-12-28 14:54:49 +01:00
parent 508e9e93d9
commit 3ddc077738
5 changed files with 45 additions and 4 deletions

5
.gitignore vendored
View File

@ -2,3 +2,8 @@
/build /build
/images /images
/site /site
/openwrt
/packages/openwrt
/packages/gluon
/packages/routing
/packages/luci

View File

@ -18,7 +18,11 @@ include $(GLUONDIR)/include/gluon.mk
TOPDIR:=$(GLUON_OPENWRTDIR) TOPDIR:=$(GLUON_OPENWRTDIR)
export TOPDIR export TOPDIR
include $(TOPDIR)/include/host.mk
update: FORCE
$(GLUONDIR)/scripts/update.sh $(GLUONDIR)
-include $(TOPDIR)/include/host.mk
_SINGLE=export MAKEFLAGS=$(space); _SINGLE=export MAKEFLAGS=$(space);
@ -27,8 +31,8 @@ override REVISION:=$(shell $(GLUONDIR)/scripts/openwrt_rev.sh $(GLUONDIR))
GREP_OPTIONS= GREP_OPTIONS=
export OPENWRT_BUILD GREP_OPTIONS REVISION export OPENWRT_BUILD GREP_OPTIONS REVISION
include $(TOPDIR)/include/debug.mk -include $(TOPDIR)/include/debug.mk
include $(TOPDIR)/include/depends.mk -include $(TOPDIR)/include/depends.mk
include $(GLUONDIR)/include/toplevel.mk include $(GLUONDIR)/include/toplevel.mk
define GluonProfile define GluonProfile

View File

@ -10,7 +10,7 @@
RELEASE:=Attitude Adjustment RELEASE:=Attitude Adjustment
PREP_MK= OPENWRT_BUILD= QUIET=0 PREP_MK= OPENWRT_BUILD= QUIET=0
include $(TOPDIR)/include/verbose.mk -include $(TOPDIR)/include/verbose.mk
REVISION:=$(shell $(TOPDIR)/scripts/getver.sh) REVISION:=$(shell $(TOPDIR)/scripts/getver.sh)

16
modules Normal file
View File

@ -0,0 +1,16 @@
GLUON_MODULES='openwrt packages/openwrt packages/gluon packages/routing packages/luci'
MODULE_OPENWRT_REPO=git://nbd.name/attitude_adjustment.git
MODULE_OPENWRT_COMMIT=162cca9386fd2d451732562efeaf57a533f3de86
MODULE_PACKAGES_OPENWRT_REPO=git://nbd.name/packages_12.09.git
MODULE_PACKAGES_OPENWRT_COMMIT=b4aa2d25af02e55e223f31894facf6d0e5300146
MODULE_PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
MODULE_PACKAGES_GLUON_COMMIT=f34c54d84cb1f874bf7d588d264dae3c0706ba0b
MODULE_PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
MODULE_PACKAGES_ROUTING_COMMIT=1c0b31528970a181327ff9309e3efd1e8c625ff0
MODULE_PACKAGES_LUCI_REPO=https://github.com/freifunk-gluon/luci.git
MODULE_PACKAGES_LUCI_COMMIT=bed710786d8a3a63f5908823e6382a51efc91003

16
scripts/update.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
. $1/modules
for module in $GLUON_MODULES; do
dir=$1/$module
mkdir -p $dir
var=$(echo "$module" | tr '[:lower:]/' '[:upper:]_')
eval repo=\${MODULE_${var}_REPO}
eval commit=\${MODULE_${var}_COMMIT}
git -C $dir init
git -C $dir fetch $repo
git -C $dir checkout -B base $commit
done