summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-06-20 12:22:20 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-06-20 12:22:20 +0000
commite6054998f0b5c2ae3aadf3735b37004356c70b96 (patch)
treeaaf2e2b91438d3698a39e98bbcfe0edae798389b /Makefile
parentefd176ac165dadf87368b71af1eed76b49fe27cd (diff)
Fix evaluation of user input on "yes/no" prompts.
This closes PR Cactus/1776: "Answering "no" to "create configuration?" does not abort". git-svn-id: http://svn.cactuscode.org/flesh/trunk@3770 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 19 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 24c61174..a57007a8 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
#
#
# @enddesc
-# @version $Id: Makefile,v 1.158 2004-06-20 12:18:48 tradke Exp $
+# @version $Id: Makefile,v 1.159 2004-06-20 12:22:20 tradke Exp $
# @@*/
##################################################################################
@@ -582,14 +582,10 @@ $(addsuffix -delete,$(CONFIGURATIONS)):
@echo $(DIVIDER)
if test "x$(DELETE_CONFIRMATION)" = "xyes" ; then \
echo "Really delete configuration $(@:%-delete=%) (no)?";\
- if ( ! read yesno rest ); then \
- yesno='no'; \
- fi; \
- if test "x$$yesno" = "xyes" ; then \
- confirm=yes ; \
- else \
- confirm=no ; \
- fi ; \
+ read confirm rest; \
+ if test $$? -ne 0 ; then \
+ confirm='no'; \
+ fi; \
else \
confirm=yes ; \
fi ; \
@@ -728,9 +724,10 @@ endif
@echo Configuration $(@:%-config=%) does not exist.;
if test "x$(PROMPT)" = "xyes" ; then \
echo Setup configuration $(@:%-config=%) \(yes\)?; \
- if ( ! read yesno rest ); then \
- yesno='no'; \
- fi; \
+ read yesno rest; \
+ if test $$? -ne 0 ; then \
+ yesno='no'; \
+ fi; \
fi; \
if [ "x$$yesno" = "xno" -o "x$$yesno" = "xn" -o "x$$yesno" = "xNO" -o "x$$yesno" = "xN" ] ;\
then \
@@ -1131,7 +1128,8 @@ cvsdiff:
downsize:
@echo $(DIVIDER)
@echo Remove flesh and thorn documentation \(\no\)?
- if ( ! read yesno rest ); then \
+ read yesno rest; \
+ if test $$? -ne 0 ; then \
yesno='no'; \
fi; \
if [ "x$$yesno" = "xyes" -o "x$$yesno" = "xy" -o "x$$yesno" = "xYES" -o "x$$yesno" = "xY" ] ;\
@@ -1140,7 +1138,8 @@ downsize:
echo $(DIVIDER) ; \
fi
@echo Remove thorn testsuites \(\no\)?
- if ( ! read yesno rest ); then \
+ read yesno rest; \
+ if test $$? -ne 0 ; then \
yesno='no'; \
fi; \
if [ "x$$yesno" = "xyes" -o "x$$yesno" = "xy" -o "x$$yesno" = "xYES" -o "x$$yesno" = "xY" ] ;\
@@ -1149,7 +1148,8 @@ downsize:
echo $(DIVIDER) ; \
fi
@echo Remove all configurations \(\no\)?
- if ( ! read yesno rest ); then \
+ read yesno rest; \
+ if test $$? -ne 0 ; then \
yesno='no'; \
fi; \
if [ "x$$yesno" = "xyes" -o "x$$yesno" = "xy" -o "x$$yesno" = "xYES" -o "x$$yesno" = "xY" ] ;\
@@ -1165,9 +1165,10 @@ downsize:
@echo "Cactus - version: $(CCTK_VERSION)"
if test "x$(PROMPT)" = "xyes" ; then \
echo Setup configuration $@ \(yes\)?; \
- if ( ! read yesno rest ); then \
- yesno='no'; \
- fi; \
+ read yesno rest; \
+ if test $$? -ne 0 ; then \
+ yesno='no'; \
+ fi; \
fi; \
if [ "x$$yesno" = "xno" -o "x$$yesno" = "xn" -o "x$$yesno" = "xNO" -o "x$$yesno" = "xN" ] ; \
then \