From: Fabian Castelli Date: Mon, 7 Jun 2021 16:45:08 +0000 (+0200) Subject: Update user interaction X-Git-Tag: v9.3.3-r1~1^2~33^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F209%2Fhead;p=candi.git Update user interaction --- diff --git a/candi.sh b/candi.sh index 7658a24..b43e9e1 100755 --- 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 + !" @@ -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 diff --git a/deal.II-toolchain/packages/dealii-prepare.package b/deal.II-toolchain/packages/dealii-prepare.package index e03bcff..645c6c2 100644 --- a/deal.II-toolchain/packages/dealii-prepare.package +++ b/deal.II-toolchain/packages/dealii-prepare.package @@ -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)