implemented basic resume system (needs improvements)
This commit is contained in:
9
init.sh
9
init.sh
@@ -90,6 +90,11 @@ load_configuration
|
|||||||
|
|
||||||
process_commandline_and_vars
|
process_commandline_and_vars
|
||||||
|
|
||||||
|
# Reinit stage file if no resuming
|
||||||
|
if [[ $RESUME != true ]]; then
|
||||||
|
[[ -f $STAGE_FILE ]] && rm -f $STAGE_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
# Run prechecks
|
# Run prechecks
|
||||||
[[ JUMP != true ]] && for mod in $MODULE_LIST; do
|
[[ JUMP != true ]] && for mod in $MODULE_LIST; do
|
||||||
. modules/$mod.sh
|
. modules/$mod.sh
|
||||||
@@ -113,10 +118,14 @@ fi
|
|||||||
|
|
||||||
# We launch modules one after one
|
# We launch modules one after one
|
||||||
for mod in $MODULE_LIST; do
|
for mod in $MODULE_LIST; do
|
||||||
|
if [[ $RESUME == true ]] && [[ $(grep $mod $STAGE_FILE) ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
# We need this only if JUMP is set but doesn't matter if it's done again
|
# We need this only if JUMP is set but doesn't matter if it's done again
|
||||||
. modules/$mod.sh
|
. modules/$mod.sh
|
||||||
version=VER_$mod
|
version=VER_$mod
|
||||||
prnt I "Application des modifications pour $mod version ${!version}..."
|
prnt I "Application des modifications pour $mod version ${!version}..."
|
||||||
|
echo $mod >> $STAGE_FILE
|
||||||
$mod
|
$mod
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user