Update installer.sh

This commit is contained in:
2026-04-21 10:37:29 -04:00
parent a52c877bfb
commit 7f853e4cf8

View File

@@ -20,21 +20,24 @@ else
echo 'fortune found' >&2
fi
mkdir -p ~/.local/share/fortune
curl -L -o ~/.local/share/fortune/tetofortunes https://gitea.cloudaf.cc/eric/TetoSongOfTheDay/raw/branch/main/tetofortunes
curl -L -o ~/.local/share/fortune/tetofortunes.dat https://gitea.cloudaf.cc/eric/TetoSongOfTheDay/raw/branch/main/tetofortunes.dat
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
#cat > $wineprefix_path/tetosong <<EOF
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
# exit 1
# else
# echo 'misfortune found' >&2
# fi
#else
# fortune ~/.local/share/tetofortunes/tetofortunes
#fi
#EOF
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
exit 1
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 :)"