please work

This commit is contained in:
Bryan Jenks 2020-04-27 15:05:46 -07:00
parent 46deb034fd
commit e3e6f5f50d
1 changed files with 3 additions and 3 deletions

6
flash
View File

@ -61,14 +61,14 @@
COUNTER=0 COUNTER=0
# Success message of setup process # Success message of setup process
DIR_MADE_MSG=" DIR_MADE_MSG="
Your ${LRED}~/.local/share/flash${NC} directory has been made and Your ${LRED}$DIR${NC} directory has been made and
your ${ORANGE}deck.csv${NC} file is ready for you to enter your flashcard data your ${ORANGE}deck.csv${NC} file is ready for you to enter your flashcard data
" "
# User has .local/share directory but no decks inside # User has .local/share directory but no decks inside
NO_DECKS=" NO_DECKS="
No decks were found, please make a new deck No decks were found, please make a new deck
using ${ORANGE}:${NC} as a delimiter in a ${ORANGE}.csv${NC} file in using ${ORANGE}:${NC} as a delimiter in a ${ORANGE}.csv${NC} file in
the ${LRED}.local/share/flash${NC} directory. the ${LRED}$DIR${NC} directory.
An example of a card: An example of a card:
${GREEN}Math:What is the square root of 4?:2:0${NC} ${GREEN}Math:What is the square root of 4?:2:0${NC}
@ -110,7 +110,7 @@ if [ ! -d "$DIR" ];then
read RESPONSE read RESPONSE
case "$RESPONSE" in case "$RESPONSE" in
[QqNn]) exit ;; [QqNn]) exit ;;
[Yy]) mkdir "$DIR" && touch {"$EXAMPLE_DECK","$HIGH_SCORE","$REVIEW_LOG"} && echo "$DECK_TEMPLATE" >> "$EXAMPLE_DECK" && echo -e "$DIR_MADE_MSG" && exit;; [Yy]) mkdir "$DIR" && touch {"$EXAMPLE_DECK","$HIGH_SCORE","$REVIEW_LOG"} && echo "$DECK_TEMPLATE" > "$EXAMPLE_DECK" && echo -e "$DIR_MADE_MSG" && exit;;
*) echo -e "invalid choice, please select either ${LGREEN}y${NC} or ${LRED}n${NC}" && exit ;; *) echo -e "invalid choice, please select either ${LGREEN}y${NC} or ${LRED}n${NC}" && exit ;;
esac esac
fi fi