From e4be32a2fffa5af3295a7378009a15b01c243e25 Mon Sep 17 00:00:00 2001 From: levasseur Date: Wed, 15 Sep 2021 12:16:43 +0200 Subject: [PATCH] fixed stage file generation, added dump of keyboard buffer before wait, few improved comments --- init.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index 30b977c..9cb0d80 100755 --- a/init.sh +++ b/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 !"