moved stage file deletion so resume can be used after using --shell or --check-only options
This commit is contained in:
12
init.sh
12
init.sh
@@ -36,7 +36,7 @@ export LC_ALL=C
|
|||||||
export LANG=C
|
export LANG=C
|
||||||
|
|
||||||
# Version of init
|
# Version of init
|
||||||
export VERSION="0.99.18"
|
export VERSION="0.99.19"
|
||||||
|
|
||||||
# Store script's path (realpath -s resolve symlinks if init.sh is a symlink)
|
# Store script's path (realpath -s resolve symlinks if init.sh is a symlink)
|
||||||
export MYPATH=$(dirname $(realpath -s $0))
|
export MYPATH=$(dirname $(realpath -s $0))
|
||||||
@@ -129,11 +129,6 @@ process_commandline_and_vars
|
|||||||
|
|
||||||
set_system_proxy
|
set_system_proxy
|
||||||
|
|
||||||
# Reinit stage file if no resuming
|
|
||||||
if [[ $RESUME != true ]] && [[ -f $STAGE_FILE ]]; then
|
|
||||||
rm -f $STAGE_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Loading activated modules
|
# Loading activated modules
|
||||||
for mod in $MODULE_LIST; do
|
for mod in $MODULE_LIST; do
|
||||||
. modules/$mod.sh
|
. modules/$mod.sh
|
||||||
@@ -237,6 +232,11 @@ read -n 1 -rsp $"Press <C> key to continue or an other one to stop now..." key &
|
|||||||
echo && separator && echo
|
echo && separator && echo
|
||||||
|
|
||||||
if [[ $key == "C" || $key == 'c' ]]; then
|
if [[ $key == "C" || $key == 'c' ]]; then
|
||||||
|
# Reinit stage file if no resuming
|
||||||
|
if [[ $RESUME != true ]] && [[ -f $STAGE_FILE ]]; then
|
||||||
|
rm -f $STAGE_FILE
|
||||||
|
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
|
if [[ $RESUME == true ]] && [[ $(grep $mod $STAGE_FILE) ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user