diff --git a/autoupdater/updater.sh b/autoupdater/updater.sh index 9266515..2424e84 100644 --- a/autoupdater/updater.sh +++ b/autoupdater/updater.sh @@ -1,14 +1,17 @@ #!/usr/bin/bash # download custom fortunes and config file echo "Updating tetosong..." + +# past here is a modified installer.sh, if i build an update option into installer.sh i cant get it to run correctly with the curl command + # check if the config file exists, if not download it and prompt the user for options. if [ ! -f ~/.local/share/tetosong/tetosong.config ]; then echo "Config file not found, downloading default..." curl -sLo ~/.local/share/tetosong/tetosong.config https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/tetosong.config fi mkdir -p ~/.local/share/tetosong -curl -sLo ~/.local/share/tetosong/tetofortunes https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/tetofortunes -curl -sLo ~/.local/share/tetosong/tetofortunes.dat https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/tetofortunes.dat +curl -sLo ~/.local/share/tetosong/tetofortunes https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/fortunes/tetosotd/tetofortunes +curl -sLo ~/.local/share/tetosong/tetofortunes.dat https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/fortunes/tetosotd/tetofortunes.dat curl -sLo ~/.local/share/tetosong/sv2SOTD.wav https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/sv2SOTD.wav # set up autoupdater diff --git a/tetofortunes b/fortunes/tetosotd/tetofortunes similarity index 100% rename from tetofortunes rename to fortunes/tetosotd/tetofortunes diff --git a/tetofortunes.dat b/fortunes/tetosotd/tetofortunes.dat similarity index 100% rename from tetofortunes.dat rename to fortunes/tetosotd/tetofortunes.dat diff --git a/installer.sh b/installer.sh index 54b96e3..cebbc75 100644 --- a/installer.sh +++ b/installer.sh @@ -30,8 +30,8 @@ case $yn in * ) echo "Please answer yes or no.";; esac mkdir -p ~/.local/share/tetosong -curl -sLo ~/.local/share/tetosong/tetofortunes https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/tetofortunes -curl -sLo ~/.local/share/tetosong/tetofortunes.dat https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/tetofortunes.dat +curl -sLo ~/.local/share/tetosong/fortunes/tetosotd/tetofortunes https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/fortunes/tetosotd/tetofortunes +curl -sLo ~/.local/share/tetosong/fortunes/tetosotd/tetofortunes.dat https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/fortunes/tetosotd/tetofortunes.dat curl -sLo ~/.local/share/tetosong/sv2SOTD.wav https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/sv2SOTD.wav # set up autoupdater diff --git a/makefortune.sh b/makefortune.sh index b7518cd..36e5099 100644 --- a/makefortune.sh +++ b/makefortune.sh @@ -48,7 +48,7 @@ while true; do echo "" echo "▼・ᴗ・▼" echo "%" - done >> tetofortunes + done >> fortunes/tetosotd/tetofortunes if [ "$START" -ge "$MAX" ]; then echo "Reached max results. Stopping." break @@ -57,5 +57,5 @@ while true; do fi done # create the fortune database from tetofortunes -rm tetofortunes.dat # delete the old database if it extists. -strfile -c % tetofortunes tetofortunes.dat +rm fortunes/tetofortunes.dat # delete the old database if it extists. +strfile -c % fortunes/tetofortunes fortunes/tetofortunes.dat