From bc6051d96250981045e79e0217ab4aef7a4283df Mon Sep 17 00:00:00 2001 From: Pete Fotheringham Date: Mon, 2 Sep 2024 15:03:00 +0100 Subject: [PATCH] Call before.sh (and correct doc comment) --- src/new_build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/new_build.sh b/src/new_build.sh index 8785f2b..70e83f0 100644 --- a/src/new_build.sh +++ b/src/new_build.sh @@ -31,12 +31,12 @@ # - main sync and build loop # For each device in `$DEVICE_LIST` # - setup subdirectories +# - `repo init` +# - `repo sync` # - setup our overlays # - Add custom packages to be installed # - Handle keys # - Prepare the environment -# - `repo init` -# - `repo sync` # - Call `before.sh` # - `breakfast` - in case of failure, call # - `post-build.sh` @@ -298,6 +298,14 @@ for codename in ${devices//,/ }; do echo ">> [$(date)] Preparing build environment disabled" fi + # Call `before.sh` + if [ -f /root/userscripts/before.sh ]; then + echo ">> [$(date)] Running before.sh" + echo "before.sh is now called *after* repo sync." + echo "In previous versions, iot was called *before* repo sync" + /root/userscripts/before.sh || { echo ">> [$(date)] Error: before.sh failed for $branch!"; userscriptfail=true; continue; } + fi + fi