Skip to content

Commit f58e204

Browse files
committed
Merge pull request #142 from sourceryinstitute/fix-yes-no-output-flip-flop-in-installer
Correct flipped y/n reporting and make Y default Closes #36
2 parents 6846374 + daf8dfc commit f58e204

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -599,16 +599,16 @@ find_or_install()
599599
echo "$this_script: Ready to build $package executable $executable in $package_install_path"
600600
fi
601601

602-
printf "$this_script: Ok to download (if necessary), build, and install $package from source? (y/n) "
602+
printf "$this_script: Ok to download (if necessary), build, and install $package from source? (Y/n) "
603603
read proceed_with_build
604604

605-
if [[ $proceed_with_build != "y" ]]; then
606-
printf "y\n"
605+
if [[ "$proceed_with_build" == "n" || "$proceed_with_build" == "no" ]]; then
606+
printf "n\n"
607607
printf "$this_script: OpenCoarrays installation requires $package. Aborting. [exit 70]\n"
608608
exit 70
609609

610610
else # permission granted to build
611-
printf "n\n"
611+
printf "Y\n"
612612

613613
# On OS X, CMake must be built with Apple LLVM gcc, which XCode command-line tools puts in /usr/bin
614614
if [[ `uname` == "Darwin" && $package == "cmake" ]]; then
@@ -745,11 +745,11 @@ print_header()
745745
printf "in ***\n"
746746
echo "$install_path"
747747
fi
748-
printf "Ready to proceed? (y/n)"
748+
printf "Ready to proceed? (Y/n)"
749749
read install_now
750750
printf " $install_now\n"
751751

752-
if [[ "$install_now" != "y" ]]; then
752+
if [[ "$install_now" == "n"|| "$install_now" == "no" ]]; then
753753
printf "$this_script: Aborting. [exit 85]\n"
754754
exit 85
755755
fi

0 commit comments

Comments
 (0)