runsmod: quelques corrections mineures
This commit is contained in:
parent
50580856f0
commit
fc75fcd960
@ -24,7 +24,7 @@ function __runsmod_loadconf() {
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$mode" ] || mode="$RUNSMOD_MODE"
|
[ -n "$mode" -a "$mode" != --NOT-SET-- ] || mode="$RUNSMOD_MODE"
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
production|prod|p) mode=prod;;
|
production|prod|p) mode=prod;;
|
||||||
development|devel|dev|d) mode=devel;;
|
development|devel|dev|d) mode=devel;;
|
||||||
@ -32,16 +32,17 @@ function __runsmod_loadconf() {
|
|||||||
esac
|
esac
|
||||||
RUNSMOD_MODE="$mode"
|
RUNSMOD_MODE="$mode"
|
||||||
|
|
||||||
[ -n "$shallow" ] || shallow="$RUNSMOD_SHALLOW"
|
[ -n "$shallow" -a "$shallow" != --NOT-SET-- ] || shallow="$RUNSMOD_SHALLOW"
|
||||||
if [ "$shallow" == auto ]; then
|
if [ "$shallow" == auto ]; then
|
||||||
case "$RUNSMOD_MODE" in
|
case "$RUNSMOD_MODE" in
|
||||||
prod) shallow=1;;
|
prod) shallow=1;;
|
||||||
devel) shallow=;;
|
devel) shallow=;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
normyesval shallow
|
||||||
RUNSMOD_SHALLOW="$shallow"
|
RUNSMOD_SHALLOW="$shallow"
|
||||||
|
|
||||||
[ -n "$update" ] || update="$RUNSMOD_UPDATE"
|
[ -n "$update" -a "$update" != --NOT-SET-- ] || update="$RUNSMOD_UPDATE"
|
||||||
if [ "$update" == auto ]; then
|
if [ "$update" == auto ]; then
|
||||||
case "$RUNSMOD_MODE" in
|
case "$RUNSMOD_MODE" in
|
||||||
prod) update=pull;;
|
prod) update=pull;;
|
||||||
@ -418,8 +419,10 @@ function runsmod_clone_or_pull() {
|
|||||||
__runsmod_clone_or_pull "$repourl" "$repodir" || r=1
|
__runsmod_clone_or_pull "$repourl" "$repodir" || r=1
|
||||||
|
|
||||||
[ -d "$repodir" ] || continue
|
[ -d "$repodir" ] || continue
|
||||||
repodir="$repodir$reposuffix"
|
array_contains REPODIRS "$repodir" && continue
|
||||||
array_addu REPODIRS "$repodir"
|
array_addu REPODIRS "$repodir"
|
||||||
|
|
||||||
|
repodir="$repodir$reposuffix"
|
||||||
case "$vprefix" in
|
case "$vprefix" in
|
||||||
SCRIPTS) array_addu SCRIPTSDIRS "$repodir";;
|
SCRIPTS) array_addu SCRIPTSDIRS "$repodir";;
|
||||||
MODULES) array_addu MODULESDIRS "$repodir";;
|
MODULES) array_addu MODULESDIRS "$repodir";;
|
||||||
@ -510,9 +513,10 @@ function runsmod_clone_or_pull() {
|
|||||||
__runsmod_clone_or_pull "$repourl" "$repodir" || r=1
|
__runsmod_clone_or_pull "$repourl" "$repodir" || r=1
|
||||||
|
|
||||||
[ -d "$repodir" ] || continue
|
[ -d "$repodir" ] || continue
|
||||||
|
array_contains REPODIRS "$repodir" && continue
|
||||||
|
array_addu REPODIRS "$repodir"
|
||||||
[ -z "$all_modules" ] && array_addu foundmodules "$module"
|
[ -z "$all_modules" ] && array_addu foundmodules "$module"
|
||||||
|
|
||||||
array_addu REPODIRS "$repodir"
|
|
||||||
repodir="$repodir$reposuffix"
|
repodir="$repodir$reposuffix"
|
||||||
case "$vprefix" in
|
case "$vprefix" in
|
||||||
SCRIPTS) array_addu SCRIPTSDIRS "$repodir";;
|
SCRIPTS) array_addu SCRIPTSDIRS "$repodir";;
|
||||||
|
12
runsmod
12
runsmod
@ -73,13 +73,13 @@ OPTIONS
|
|||||||
}
|
}
|
||||||
|
|
||||||
config=
|
config=
|
||||||
mode=
|
mode=--NOT-SET--
|
||||||
fetch=1
|
fetch=1
|
||||||
host_mode=auto
|
host_mode=auto
|
||||||
host=
|
host=
|
||||||
update_repolist=auto
|
update_repolist=auto
|
||||||
shallow=auto
|
shallow_clone=--NOT-SET--
|
||||||
update=auto
|
update=--NOT-SET--
|
||||||
identity=
|
identity=
|
||||||
output=
|
output=
|
||||||
append_output=
|
append_output=
|
||||||
@ -95,8 +95,8 @@ parse_opts "${PRETTYOPTS[@]}" \
|
|||||||
-T,--this-host host_mode=self \
|
-T,--this-host host_mode=self \
|
||||||
--update-repolist update_repolist=1 \
|
--update-repolist update_repolist=1 \
|
||||||
--no-update-repolist update_repolist= \
|
--no-update-repolist update_repolist= \
|
||||||
--shallow-clone shallow=1 \
|
--shallow-clone shallow_clone=yes \
|
||||||
--no-shallow-clone shallow= \
|
--no-shallow-clone shallow_clone=no \
|
||||||
-0,--offline update=offline \
|
-0,--offline update=offline \
|
||||||
-n,--no-pull update=clone \
|
-n,--no-pull update=clone \
|
||||||
-u,--pull update=pull \
|
-u,--pull update=pull \
|
||||||
@ -145,7 +145,7 @@ copy { print }
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
__runsmod_loadconf "$config" "$mode" "$shallow" "$update" || die
|
__runsmod_loadconf "$config" "$mode" "$shallow_clone" "$update" || die
|
||||||
runsmod_checkenv || die
|
runsmod_checkenv || die
|
||||||
estepn "Opération dans le mode $RUNSMOD_MODE"
|
estepn "Opération dans le mode $RUNSMOD_MODE"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user