Move reading.sh to clow.sh
This commit is contained in:
parent
ebcb8157de
commit
159c6d3827
62
clow.sh
Executable file
62
clow.sh
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
# one Card for each of the cardinals Also 4 stages of the day
|
||||||
|
draw_card() {
|
||||||
|
local C=$((RANDOM % 52 + 1))
|
||||||
|
recsel -e "Order=$C" cards.rec | sed 's/+//g'
|
||||||
|
|
||||||
|
}
|
||||||
|
full_reading() {
|
||||||
|
local N=$((RANDOM % 52 + 1))
|
||||||
|
local S=$((RANDOM % 52 + 1))
|
||||||
|
local E=$((RANDOM % 52 + 1))
|
||||||
|
local W=$((RANDOM % 52 + 1))
|
||||||
|
|
||||||
|
echo -e "Your Card from the at the North/Air is"
|
||||||
|
|
||||||
|
recsel -e "Order=$N" cards.rec | sed 's/+//g'
|
||||||
|
echo "press enter to continue"
|
||||||
|
read
|
||||||
|
clear
|
||||||
|
echo -e "Your Card at East/Water is"
|
||||||
|
recsel -e "Order=$E" cards.rec | sed 's/+//g'
|
||||||
|
read
|
||||||
|
clear
|
||||||
|
echo -e "At the South/Earth"
|
||||||
|
recsel -e "Order=$S" cards.rec | sed 's/+//g'
|
||||||
|
read
|
||||||
|
clear
|
||||||
|
echo -e "Finally at the West/Fire"
|
||||||
|
recsel -e "Order=$W" cards.rec | sed 's/+//g'
|
||||||
|
read
|
||||||
|
clear
|
||||||
|
}
|
||||||
|
cleanup_exit() {
|
||||||
|
|
||||||
|
echo "have a magical day"
|
||||||
|
echo "Press enter to exit"
|
||||||
|
echo -e "\033[0m"
|
||||||
|
read
|
||||||
|
clear
|
||||||
|
exit
|
||||||
|
|
||||||
|
}
|
||||||
|
echo -e "\033[37;44m"
|
||||||
|
clear
|
||||||
|
echo -e "You have opened the book of the Clow"
|
||||||
|
while true; do
|
||||||
|
read -r -p "Menu: Draw/Reading/Quit " answer
|
||||||
|
case $answer in
|
||||||
|
[Dd]*)
|
||||||
|
draw_card
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
[Rr]*)
|
||||||
|
full_reading
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
[Qq]*) cleanup_exit ;;
|
||||||
|
*) echo "Valid Choices are D/R/Q." ;;
|
||||||
|
esac
|
||||||
|
done
|
29
reading.sh
29
reading.sh
@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
# one Card for each of the cardinals Also 4 stages of the day
|
|
||||||
N=$((RANDOM % 52 + 1))
|
|
||||||
S=$((RANDOM % 52 + 1))
|
|
||||||
E=$((RANDOM % 52 + 1))
|
|
||||||
W=$((RANDOM % 52 + 1))
|
|
||||||
|
|
||||||
echo -e "Your Card from the at the North/Air is"
|
|
||||||
|
|
||||||
recsel -e "Order=$N" cards.rec | sed 's/+//g'
|
|
||||||
echo "press enter to continue"
|
|
||||||
read
|
|
||||||
clear
|
|
||||||
echo -e "Your Card at East/Water is"
|
|
||||||
recsel -e "Order=$E" cards.rec | sed 's/+//g'
|
|
||||||
read
|
|
||||||
clear
|
|
||||||
echo -e "At the South/Earth"
|
|
||||||
recsel -e "Order=$S" cards.rec | sed 's/+/ /g'
|
|
||||||
read
|
|
||||||
clear
|
|
||||||
echo -e "Finally at the West/Fire"
|
|
||||||
recsel -e "Order=$W" cards.rec | sed 's/+/ /g'
|
|
||||||
read
|
|
||||||
clear
|
|
||||||
|
|
||||||
echo "have a magical day"
|
|
Loading…
x
Reference in New Issue
Block a user