buildscript: Add separate parameter to update feeds in build dir

By running "./buildscript updatefeeds", the feeds in build dir are
recreated without touching the rest of the directory.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Adrian Schmutzler 2019-10-07 14:28:07 +02:00 committed by Fabian Bläse
parent 78e187e7c7
commit 3720af5ee5
1 changed files with 12 additions and 4 deletions

View File

@ -136,6 +136,14 @@ prepare() {
# force the reevaluation of this Makefile to make note of the new variant # force the reevaluation of this Makefile to make note of the new variant
touch ./src/packages/fff/fff/Makefile touch ./src/packages/fff/fff/Makefile
#saves ~200MB for each build
test -d ./src/dl || mkdir ./src/dl
ln -s ../src/dl "$builddir"/dl
update_feeds
}
update_feeds() {
## generate own feeds.conf ## generate own feeds.conf
#this local variable should be globally configure variable used in get_source and here #this local variable should be globally configure variable used in get_source and here
local PACKAGEBASE=${PWD}/src/packages local PACKAGEBASE=${PWD}/src/packages
@ -166,10 +174,6 @@ prepare() {
"$builddir"/scripts/feeds install -p "$NAME" "${PACKAGESVAR[@]}" "$builddir"/scripts/feeds install -p "$NAME" "${PACKAGESVAR[@]}"
fi fi
done done
#saves ~200MB for each build
test -d ./src/dl || mkdir ./src/dl
ln -s ../src/dl "$builddir"/dl
} }
prebuild() { prebuild() {
@ -438,6 +442,9 @@ case "$1" in
prepare prepare
fi fi
;; ;;
"updatefeeds")
update_feeds
;;
"build") "build")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option compiles the firmware" echo "This option compiles the firmware"
@ -501,6 +508,7 @@ case "$1" in
echo " selectbsp <bsp-file>" echo " selectbsp <bsp-file>"
echo " selectvariant <name of variant>" echo " selectvariant <name of variant>"
echo " prepare" echo " prepare"
echo " updatefeeds"
echo " config openwrt" echo " config openwrt"
echo " build [fast|debug]" echo " build [fast|debug]"
echo " buildall [fast]" echo " buildall [fast]"