update installer and readme

This commit is contained in:
2026-04-21 12:32:56 -04:00
parent b043cf268c
commit 83f1e12234
2 changed files with 21 additions and 23 deletions

View File

@@ -1 +1,9 @@
custom fortune list for fortune/misfortune that has every teto song on vocadb
custom fortune list and wrapper for fortune/misfortune that has every teto song on vocadb
requires fortune/fortune-mod or misfortune installed. makefortune.sh requires fortune/fortune-mod to generate tetofortunes.dat.
dowload installer.sh and run it, once finished you can get your teto song of the day by running:
```bash
tetosong
```

View File

@@ -1,43 +1,33 @@
#!/usr/bin/bash
#
# this one is going to get the fortune wrapper set up and all that good stuff.
#
# it needs to check if fortune is installed (or misfortune if not) ans then i need to find out how to find where the fortune files are installed (i have a misfortune folder, but i cant imagine fortune stores them in there)
# then i need to downlaod the tetofortunes and tetofortunes.dat files to that location
#
# then i need to write a script to ~/.local/bin caled tetosong that simply calls either fortune or misfortune (i'll check i guess?)
#
if ! [ -x "$(command -v fortune)" ]; then
echo 'fortune is not installed, checking for misfortune' >&2
echo 'fortune is not installed, checking for misfortune'm
if ! [ -x "$(command -v misfortune)" ]; then
echo 'neither program is installed, exiting' >&2
echo 'neither program is installed, exiting'
exit 1
else
echo 'misfortune found' >&2
echo 'misfortune found'
fi
else
echo 'fortune found' >&2
echo 'fortune found'
fi
echo "Downloading custom fortunes..."
mkdir -p ~/.local/share/tetosong
curl -L -o ~/.local/share/tetosong/tetofortunes https://github.com/eric5949/TetoSongOfTheDay/raw/a52c877bfb1508f0223469e3b9e86c65ee6915ae/tetofortunes
curl -L -o ~/.local/share/tetosong/tetofortunes.dat https://github.com/eric5949/TetoSongOfTheDay/raw/a52c877bfb1508f0223469e3b9e86c65ee6915ae/tetofortunes.dat
curl -s -L -o ~/.local/share/tetosong/tetofortunes https://github.com/eric5949/TetoSongOfTheDay/raw/a52c877bfb1508f0223469e3b9e86c65ee6915ae/tetofortunes
curl -s -L -o ~/.local/share/tetosong/tetofortunes.dat https://github.com/eric5949/TetoSongOfTheDay/raw/a52c877bfb1508f0223469e3b9e86c65ee6915ae/tetofortunes.dat
echo "writing tetosong to ~/.local/bin"
mkdir -p ~/.local/bin
cat > ~/.local/bin/tetosong <<EOF
#!/bin/bash
if ! [ -x "$(command -v fortune)" ]; then
echo 'fortune is not installed, checking for misfortune' >&2
if ! [ -x "$(command -v misfortune)" ]; then
echo 'neither program is installed, exiting' >&2
echo 'No fortune commmand is installed, exiting!'
exit 1
else
misfortune ~/.local/share/tetosong/tetofortunes
fi
else
fortune ~/.local/share/tetosong/tetofortunes
fi
EOF
chmod +x ~/.local/bin/tetosong
echo "you can get your Teto Song Of the Day by typing in tetosong or adding it to your bashrc :)"