improved and corrected dependency system, added option to disable it
This commit is contained in:
32
init.sh
32
init.sh
@@ -147,17 +147,33 @@ fi
|
|||||||
# Run prechecks
|
# Run prechecks
|
||||||
if [[ JUMP != true ]]; then
|
if [[ JUMP != true ]]; then
|
||||||
tmpfile=$(mktemp /tmp/init-XXXXXX)
|
tmpfile=$(mktemp /tmp/init-XXXXXX)
|
||||||
|
if [[ -n $MANUAL_MODULE_LIST ]]; then
|
||||||
|
prnt W "La vérification des dépendences est désactivé avec une liste manuelle de module."
|
||||||
|
fi
|
||||||
|
if [[ $NO_DEPS == true ]]; then
|
||||||
|
prnt W "La vérification des dépendences à été désactivée manuellement."
|
||||||
|
fi
|
||||||
|
if [[ $RESUME == true ]]; then
|
||||||
|
cat $STAGE_FILE >> $tmpfile
|
||||||
|
fi
|
||||||
for mod in $MODULE_LIST; do
|
for mod in $MODULE_LIST; do
|
||||||
version=VER_$mod
|
version=VER_$mod
|
||||||
|
if [[ $RESUME == true ]] && [[ $(grep $mod $STAGE_FILE) ]]; then
|
||||||
|
prnt I "Vérification précédemment exécuté pour $mod version ${!version}."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
prnt I "Vérification initiale pour $mod version ${!version}..."
|
prnt I "Vérification initiale pour $mod version ${!version}..."
|
||||||
deps=DEP_$mod
|
if [[ -z $MANUAL_MODULE_LIST && $NO_DEPS != true ]]; then
|
||||||
for dep in ${!deps}; do
|
deps=DEP_$mod
|
||||||
if [[ ! $(grep $dep $tmpfile) ]]; then
|
for dep in ${!deps}; do
|
||||||
prnt E "Le module $mod a des dépendances non satisfaite ou est exécuté trop tôt."
|
if [[ ! $(grep $dep $tmpfile) ]]; then
|
||||||
prnt E " * $dep doit être exécuté avant $mod, vérifiez votre liste de modules."
|
prnt E "Le module $mod a des dépendances non satisfaite ou est exécuté trop tôt."
|
||||||
die 9
|
prnt E " * $dep doit être exécuté avant $mod, vérifiez votre liste de modules."
|
||||||
fi
|
die 9
|
||||||
done
|
fi
|
||||||
|
done
|
||||||
|
unset deps
|
||||||
|
fi
|
||||||
precheck_$mod
|
precheck_$mod
|
||||||
echo $mod >> $tmpfile
|
echo $mod >> $tmpfile
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ read_commandline()
|
|||||||
"-R"|"--no-root-check")
|
"-R"|"--no-root-check")
|
||||||
export NO_ROOT_CHECK=true
|
export NO_ROOT_CHECK=true
|
||||||
;;
|
;;
|
||||||
|
"-D"|"--no-deps")
|
||||||
|
export NO_DEPS=true
|
||||||
|
;;
|
||||||
"-P"|"--no-proxy")
|
"-P"|"--no-proxy")
|
||||||
export NO_PROXY=true
|
export NO_PROXY=true
|
||||||
;;
|
;;
|
||||||
@@ -76,7 +79,7 @@ read_commandline()
|
|||||||
if [[ $want_module == true ]]; then
|
if [[ $want_module == true ]]; then
|
||||||
[[ $want_logfile == true ]] && synthax_error
|
[[ $want_logfile == true ]] && synthax_error
|
||||||
[[ $want_conffile == true ]] && synthax_error
|
[[ $want_conffile == true ]] && synthax_error
|
||||||
if [[ ! $MANUAL_MODULE_LIST ]]; then
|
if [[ -z $MANUAL_MODULE_LIST ]]; then
|
||||||
export MANUAL_MODULE_LIST=$opt
|
export MANUAL_MODULE_LIST=$opt
|
||||||
want_module=false
|
want_module=false
|
||||||
else
|
else
|
||||||
@@ -87,7 +90,7 @@ read_commandline()
|
|||||||
elif [[ $want_logfile == true ]]; then
|
elif [[ $want_logfile == true ]]; then
|
||||||
[[ $want_module == true ]] && synthax_error
|
[[ $want_module == true ]] && synthax_error
|
||||||
[[ $want_conffile == true ]] && synthax_error
|
[[ $want_conffile == true ]] && synthax_error
|
||||||
if [[ ! $NEW_LOGFILE ]]; then
|
if [[ -z $NEW_LOGFILE ]]; then
|
||||||
export NEW_LOGFILE=$opt
|
export NEW_LOGFILE=$opt
|
||||||
want_logfile=false
|
want_logfile=false
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user