From a3870ffaf4d9ad6061013e973b9faeec8ed1e202 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Sun, 19 Apr 2020 08:50:38 -0400 Subject: [PATCH] Set LOCAL depending on whether host-specific config was found --- git-build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/git-build.sh b/git-build.sh index 88ba019..6a98635 100755 --- a/git-build.sh +++ b/git-build.sh @@ -18,8 +18,16 @@ run() { # So scripts can know we're still running (for autoupdater) touch $BASEDIR/.LOCK +# Overriden by -f/--force to force rebuild when no update is available FORCE=0 +# Check if we have host-specific config then LOCAL=0 +LOCAL=1 +for folder in $BASEDIR/*/; do + # Hidden folders (repos) are ignored by the pattern, so we can assume if a folder is not config/ then there are host-based configs here. + [[ "$(basename $folder)" != "config" ]] && LOCAL=0 && break +done + # Find targeted projects from args PROJECTS=() for arg in "$@"; do