From patchwork Tue Oct 1 22:29:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] buildscript: Add separate parameter to update feeds in build dir From: Adrian Schmutzler X-Patchwork-Id: 1197 Message-Id: <20191001222907.30588-2-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Wed, 2 Oct 2019 00:29:07 +0200 By running "./buildscript updatefeeds", the feeds in build dir are recreated without touching the rest of the directory. Signed-off-by: Adrian Schmutzler --- This is added as 2/2 as it depends on the change of the dl directory link. However, 1/2 can be applied without caring about 2/2 ... --- buildscript | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/buildscript b/buildscript index 419bf7b5..70cb8b90 100755 --- a/buildscript +++ b/buildscript @@ -136,6 +136,14 @@ prepare() { # force the reevaluation of this Makefile to make note of the new variant touch ./src/packages/fff/fff/Makefile + #saves ~200MB for each build + test -d ./src/dl || mkdir ./src/dl + ln -s ../src/dl "$target"/dl + + update_feeds +} + +update_feeds() { ## generate own feeds.conf #this local variable should be globally configure variable used in get_source and here local PACKAGEBASE=${PWD}/src/packages @@ -166,10 +174,6 @@ prepare() { "$target"/scripts/feeds install -p "$NAME" "${PACKAGESVAR[@]}" fi done - - #saves ~200MB for each build - test -d ./src/dl || mkdir ./src/dl - ln -s ../src/dl "$target"/dl } prebuild() { @@ -431,6 +435,9 @@ case "$1" in prepare fi ;; + "updatefeeds") + update_feeds + ;; "build") if [ "$2" = "help" ] || [ "$2" = "x" ]; then echo "This option compiles the firmware" @@ -494,6 +501,7 @@ case "$1" in echo " selectbsp " echo " selectvariant " echo " prepare" + echo " updatefeeds" echo " config openwrt" echo " build [fast|debug]" echo " buildall [fast]"