fixed stage file generation, added dump of keyboard buffer before wait, few improved comments
This commit is contained in:
11
init.sh
11
init.sh
@@ -24,9 +24,11 @@ set -o pipefail
|
||||
set -o errtrace
|
||||
|
||||
# set -e : exit the script if any statement returns a non-true return value
|
||||
# exeption to that will need a special function call
|
||||
set -o errexit
|
||||
|
||||
# set +u : allow undeclared variables (configuration files don't need to be complete)
|
||||
# set +u: allow undeclared variables because configuration files don't need
|
||||
# to be complete (even if it's bad practice)
|
||||
set +o nounset
|
||||
|
||||
# We want english messages
|
||||
@@ -34,7 +36,7 @@ export LC_ALL=C
|
||||
export LANG=C
|
||||
|
||||
# Version of init
|
||||
export VERSION="0.99.4"
|
||||
export VERSION="0.99.5"
|
||||
|
||||
# Store script's path
|
||||
export MYPATH=$(dirname $0)
|
||||
@@ -144,7 +146,8 @@ else
|
||||
echo "Appuyez sur CTLR + C maintenant si vous souhaitez interrompre."
|
||||
echo -e "${BYellow}Si vous continuez après cette étape le système sera modifié !${DEFAULTCOL}"
|
||||
echo
|
||||
read -n 1 -s -r -p "Appuyer sur n'importe quelle touche pour continuer..."
|
||||
while read -r -t 0.001; do :; done # dump the buffer
|
||||
read -n 1 -prs $"Appuyer sur n'importe quelle touche pour continuer...\n"
|
||||
fi
|
||||
|
||||
# We launch modules one after one
|
||||
@@ -154,10 +157,10 @@ for mod in $MODULE_LIST; do
|
||||
fi
|
||||
# We need this only if JUMP is set but doesn't matter if it's done again
|
||||
. modules/$mod.sh
|
||||
echo $mod >> $STAGE_FILE
|
||||
version=VER_$mod
|
||||
prnt I "Application des modifications pour $mod version ${!version}..."
|
||||
$mod
|
||||
echo $mod >> $STAGE_FILE # Mark as done for resuming function
|
||||
done
|
||||
|
||||
prnt I "That's all folks !"
|
||||
|
||||
Reference in New Issue
Block a user