consolidate first case stmt, and +exit to * opt

This commit is contained in:
Bryan Jenks 2020-04-19 02:40:09 -07:00
parent da43175273
commit bfab9b4691
1 changed files with 2 additions and 3 deletions

5
flash
View File

@ -73,10 +73,9 @@ if [ ! -d $DIR ];then # If Directory does NOT exist
echo "No '.local/share/flash' directory, make it? y/n" echo "No '.local/share/flash' directory, make it? y/n"
read RESPONSE read RESPONSE
case "$RESPONSE" in case "$RESPONSE" in
[Nn]) exit ;; [QqNn]) exit ;;
[Qq]) exit ;;
[Yy]) mkdir "$DIR" && touch $EXAMPLE_DECK && echo "$DECK_TEMPLATE" >> $EXAMPLE_DECK && echo "$DIR_MADE_MSG" ;; [Yy]) mkdir "$DIR" && touch $EXAMPLE_DECK && echo "$DECK_TEMPLATE" >> $EXAMPLE_DECK && echo "$DIR_MADE_MSG" ;;
*) echo "invalid choice, please select either 'y' or 'n'" ;; *) echo "invalid choice, please select either 'y' or 'n'" && exit ;;
esac esac
fi fi