New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 14883 – NEMO

Changeset 14883


Ignore:
Timestamp:
2021-05-18T20:34:36+02:00 (3 years ago)
Author:
acc
Message:

Branch: sette_ticket2673. Prompt for user confirmation rather than implicitly change options if a non-viable combination has been asked for. #2673

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/sette_ticket2673/sette.sh

    r14881 r14883  
    120120# Option dependency tests 
    121121# 
    122 if [ ${USING_TILING} == "yes" ] ; then export USING_EXTRA_HALO="yes" ; fi 
    123  
     122if [ ${USING_TILING} == "yes" ] ; then  
     123 if [ ${USING_EXTRA_HALO} == "no" ] ; then 
     124  while true; do 
     125      read -p "Tiling requires the extra halo but you have used -e to deselect it. Would you like to reselect it? (y/n)?: " yn 
     126      case $yn in 
     127          [Yy]* ) echo "Ok, ignoring the -e option"; USING_EXTRA_HALO="yes"; break;; 
     128          [Nn]* ) echo "Ok, exiting instead"; exit 42;; 
     129          * ) echo "Please answer yes or no.";; 
     130      esac 
     131  done 
     132 fi 
     133fi 
     134if [ ${USING_LOOP_FUSION} == "yes" ] ; then  
     135 if [ ${USING_EXTRA_HALO} == "no" ] ; then 
     136  while true; do 
     137      read -p "Loop fusion requires the extra halo but you have used -e to deselect it. Would you like to reselect it? (y/n)?: " yn 
     138      case $yn in 
     139          [Yy]* ) echo "Ok, ignoring the -e option"; USING_EXTRA_HALO="yes"; break;; 
     140          [Nn]* ) echo "Ok, exiting instead"; exit 42;; 
     141          * ) echo "Please answer yes or no.";; 
     142      esac 
     143  done 
     144 fi 
     145fi 
    124146# 
    125147# Get SETTE parameters 
     
    149171      read -p "$NEMO_VALIDATION_DIR does not exist. Do you wish to create it? " yn 
    150172      case $yn in 
    151           [Yy]* ) mkdir $NEMO_VALIDATION_DIR; break;; 
    152           [Nn]* ) exit 42;; 
     173          [Yy]* ) echo "Ok, creating $NEMO_VALIDATION_DIR"; mkdir $NEMO_VALIDATION_DIR; break;; 
     174          [Nn]* ) echo "Ok, exiting instead"; exit 42;; 
    153175          * ) echo "Please answer yes or no.";; 
    154176      esac 
Note: See TracChangeset for help on using the changeset viewer.