Initial implementation of the CLI tool.

This commit is contained in:
ikuisma
2018-10-30 08:59:42 +02:00
parent d2bc0d4e5e
commit 518133bdd3
9 changed files with 263 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
#!/bin/bash
source scripts.sh
PS3='Please enter your choice: '
mopo () {
if [ $(tput cols) -gt "100" ]; then
cat assets/mopo2.txt
fi
}
logo () {
if [ $(tput cols) -gt "100" ]; then
cat assets/logo.txt
fi
}
logo
options=("Full setup" "Full reset" "Get db dump" "Reset db" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Full setup")
mopo
run_setup
;;
"Full reset")
purge
;;
"Drop, create, dump ")
db_drop_create_dump
;;
"Get db dump")
get_dump
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
done