diff --git a/git-build.sh b/git-build.sh index 550d4cc..bbeecc0 100755 --- a/git-build.sh +++ b/git-build.sh @@ -12,7 +12,7 @@ run() { p_name="$1" echo "[$p_name] RUN" # Run in background and redirect output to $p_name.log - (GITBUILDDIR="$BASEDIR" nohup $BASEDIR/$p_name $p_name > $BASEDIR/$p_name.log 2> $BASEDIR/$p_name.err) & + (GITBUILDCONF="$CONFDIR" GITBUILDDIR="$BASEDIR" nohup $BASEDIR/$p_name $p_name > $BASEDIR/$p_name.log 2> $BASEDIR/$p_name.err) & } # So scripts can know we're still running (for autoupdater) @@ -28,6 +28,9 @@ for folder in $BASEDIR/*/; do [[ "$(basename $folder)" != "config" ]] && LOCAL=0 && break done +# Pass either local or global config to the task +[[ LOCAL = 1 ]] && CONFDIR=$BASEDIR/config || CONFDIR="$BASEDIR/$HOSTNAME" + # Find targeted projects from args PROJECTS=() for arg in "$@"; do