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