summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2020-07-13 14:43:39 +0200
committerKarel Kočí <karel.koci@nic.cz>2020-07-13 14:43:39 +0200
commite56414de87c5115bca6646c45ba139da6daaec4a (patch)
tree9a45b2d7e7b4cb2174fb0212235c8396e273ebf8
parentd86e40dcbf51b936c9925ad793aaa8fca9f5a42c (diff)
downloadlaminar-cnf-e56414de87c5115bca6646c45ba139da6daaec4a.tar.gz
laminar-cnf-e56414de87c5115bca6646c45ba139da6daaec4a.tar.bz2
laminar-cnf-e56414de87c5115bca6646c45ba139da6daaec4a.zip
turris: do not fail if one package fails
-rw-r--r--scripts/utils3
-rwxr-xr-xtemplates/turris.run7
2 files changed, 8 insertions, 2 deletions
diff --git a/scripts/utils b/scripts/utils
index 6254d88..c17e37f 100644
--- a/scripts/utils
+++ b/scripts/utils
@@ -13,6 +13,9 @@ echo_stage() {
echo_info() {
echo -e "\033[1;32m---------- " "$@" " ----------\033[0m" >&2
}
+echo_error() {
+ echo -e "\033[1;31m---------- " "$@" " ----------\033[0m" >&2
+}
echo_debug() {
echo -e "\033[1;30m--- " "$@" " ---\033[0m" >&2
}
diff --git a/templates/turris.run b/templates/turris.run
index b392f63..f51f29b 100755
--- a/templates/turris.run
+++ b/templates/turris.run
@@ -53,8 +53,11 @@ find feeds/personal -type d -exec test -f '{}/Makefile' \; -prune -printf "%P\0"
xargs -0 ./scripts/feeds uninstall # Remove any package provided by personal feed
./scripts/feeds install -p personal -d y -f -a
echo_stage "Compile packages from personal feed"
-find package/feeds/personal -mindepth 1 -maxdepth 1 -printf 'package/%P/compile\0' | \
- xargs -n 1 --null $make
+find package/feeds/personal -mindepth 1 -maxdepth 1 -printf '%P\0' | \
+ while IFS=$'\0' read -r package; do
+ $make "package/$package/compile" || \
+ echo_error "Package build failed: $package"
+ done
echo_stage "Generate index and sign"
$make package/index BUILD_KEY=~/openwrt-repo.sec