From 86a3734a2d25f2e591fb34c63e8a8c3db7897c43 Mon Sep 17 00:00:00 2001 From: Bryan Jenks Date: Fri, 17 Apr 2020 14:35:52 -0700 Subject: [PATCH] consolidate case statements more --- flash | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/flash b/flash index ea5245f..65373ab 100755 --- a/flash +++ b/flash @@ -41,12 +41,9 @@ if [ ! -d $DIR ];then # If Directory does NOT exist echo "No '.local/share/flash' directory, make it? y/n" read RESPONSE case "$RESPONSE" in - n) exit ;; - N) exit ;; - q) exit ;; - Q) exit ;; - y) mkdir $DIR && touch $TEMPLATE_DECK && echo "category1:question1:answer1" >> $TEMPLATE_DECK && echo "category2:question2:answer2" >> $TEMPLATE_DECK && echo "category3:question3:answer3" >> $TEMPLATE_DECK && echo "$DIR_MADE_MSG" ;; - Y) mkdir $DIR && touch $TEMPLATE_DECK && echo "category1:question1:answer1" >> $TEMPLATE_DECK && echo "category2:question2:answer2" >> $TEMPLATE_DECK && echo "category3:question3:answer3" >> $TEMPLATE_DECK && echo "$DIR_MADE_MSG" ;; + [Nn]) exit ;; + [Qq]) exit ;; + [Yy]) mkdir $DIR && touch $TEMPLATE_DECK && echo "category1:question1:answer1" >> $TEMPLATE_DECK && echo "category2:question2:answer2" >> $TEMPLATE_DECK && echo "category3:question3:answer3" >> $TEMPLATE_DECK && echo "$DIR_MADE_MSG" ;; *) echo "invalid choice, please select either 'y' or 'n'" ;; esac fi