]> https://gitweb.dealii.org/ - candi.git/commitdiff
Update user interaction 209/head
authorFabian Castelli <fabian.castelli@kit.edu>
Mon, 7 Jun 2021 16:45:08 +0000 (18:45 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Tue, 29 Jun 2021 08:47:16 +0000 (10:47 +0200)
candi.sh
deal.II-toolchain/packages/dealii-prepare.package

index 7658a24800ef683ed7dcf0a8775976a8febca03f..b43e9e146950eb69a2e91c1d631613c5bc8bdf94 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -42,7 +42,7 @@ TIC_GLOBAL="$(${DATE_CMD} +%s)"
 PREFIX=~/deal.ii-candi
 JOBS=1
 CMD_PACKAGES=""
-SKIP_READ=false
+USER_INTERACTION=ON
 
 while [ -n "$1" ]; do
     param="$1"
@@ -106,7 +106,7 @@ while [ -n "$1" ]; do
         #####################################
         # Assume yes to prompts
         -y|--yes|--assume-yes)
-            SKIP_READ=true
+            USER_INTERACTION=OFF
         ;;
 
        *)
@@ -171,7 +171,7 @@ cecho() {
 }
 
 cls() {
-    if [ ${SKIP_READ} = false ]; then
+    if [ ${USER_INTERACTION} = ON ]; then
         # clear screen
         COL=$1; shift
         echo -e "${COL}$@\033c"
@@ -841,9 +841,10 @@ echo
 awk '/^##/ {exit} {$1=""; print}' <${PLATFORM}
 echo
 
-# Let the user confirm now, that the PLATFORM is set up correctly
-echo "-------------------------------------------------------------------------------"
-if [ ${SKIP_READ} = false ]; then
+# If interaction is enabled, let the user confirm, that the platform is set up
+# correctly
+if [ ${USER_INTERACTION} = ON ]; then
+    echo "--------------------------------------------------------------------------------"
     cecho ${GOOD} "Please make sure you've read the instructions above and your system"
     cecho ${GOOD} "is ready for installing ${PROJECT}."
     cecho ${BAD} "If not, please abort the installer by pressing <CTRL> + <C> !"
@@ -980,9 +981,9 @@ if [ -z "$CC" ] || [ -z "$CXX" ] || [ -z "$FC" ] || [ -z "$FF" ]; then
 fi
 
 ################################################################################
-# Force the user to accept the current output
-echo "-------------------------------------------------------------------------------"
-if [ ${SKIP_READ} = false ]; then
+# If interaction is enabled, force the user to accept the current output
+if [ ${USER_INTERACTION} = ON ]; then
+    echo "--------------------------------------------------------------------------------"
     cecho ${GOOD} "Once ready, hit enter to continue!"
     read
 fi
index e03bcffc89294ed8935461b462bfc52eeab1e60e..645c6c2a1a592695f08a34ff2b7e103b4013aa78 100644 (file)
@@ -22,8 +22,11 @@ if [ ! -z "${PACKAGES_OFF}" ]; then
     cecho ${WARN} "deal.II: forcing package skip for: ${PACKAGES_OFF}"
     cecho ${INFO} "This is coming from your personal DEAL_II_CONFOPTS settings!"
     echo
-    cecho ${GOOD} "Please confirm this behaviour by pressing enter..."
-    read
+
+    if [ ${USER_INTERACTION} = ON ]; then
+        cecho ${GOOD} "Please confirm this behaviour by pressing enter..."
+        read
+    fi
 fi
 
 # Check if we hit cmake-3.10+ and deal.II v8.5.1 configure error (MPI / FindMPI)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.