Tasks can access config (either local or global)
This commit is contained in:
parent
beca1ef2fe
commit
3dc6be35c1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user