From 4b9fcfeece9b575ef92a0fed40154d48a9b4c41e Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sun, 30 Dec 2018 00:37:21 +0100 Subject: [PATCH] build-package.sh: make dep downloads less verbose for quiet builds Add error messages when download fails though. Try to download -dev packages but ignore errors here --- build-package.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build-package.sh b/build-package.sh index 7150136b6..c366a24fa 100755 --- a/build-package.sh +++ b/build-package.sh @@ -509,9 +509,17 @@ termux_step_start_build() { # Download dependencies local pkg dep_arch dep_version for pkg in $TERMUX_ALL_DEPS; do - echo "Downloading dependency $(basename $pkg) if necessary..." read dep_arch dep_version <<< $(termux_extract_dep_info "$pkg") - termux_install_dep_deb $(basename $pkg) $dep_arch $dep_version + if [ ! "$TERMUX_QUIET_BUILD" = true ]; then + echo "Downloading dependency $(basename $pkg) $dep_version if necessary..." + fi + termux_install_dep_deb $(basename $pkg) $dep_arch $dep_version \ + || ( echo "Download of $(basename $pkg) $dep_version from $TERMUX_REPO_URL failed, building instead" \ + && ./build-package.sh -a $TERMUX_ARCH -s "$pkg" \ + && continue ) + + termux_install_dep_deb $(basename $pkg)-dev $dep_arch $dep_version || \ + echo "Download of $(basename $pkg)-dev $dep_version from $TERMUX_REPO_URL failed" done elif [ "$TERMUX_SKIP_DEPCHECK" = false ] && [ "$TERMUX_INSTALL_DEPS" = false ]; then # Build dependencies