diff --git a/init.sh b/init.sh index cf7e8b9..7fc2eac 100755 --- a/init.sh +++ b/init.sh @@ -90,6 +90,11 @@ load_configuration process_commandline_and_vars +# Reinit stage file if no resuming +if [[ $RESUME != true ]]; then + [[ -f $STAGE_FILE ]] && rm -f $STAGE_FILE +fi + # Run prechecks [[ JUMP != true ]] && for mod in $MODULE_LIST; do . modules/$mod.sh @@ -113,10 +118,14 @@ fi # We launch modules one after one 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 . modules/$mod.sh version=VER_$mod prnt I "Application des modifications pour $mod version ${!version}..." + echo $mod >> $STAGE_FILE $mod done