fix install and update

no tetosong folder = cant download config
This commit is contained in:
2026-04-24 11:07:43 -04:00
parent e1f9f755c2
commit c4d479f161
2 changed files with 5 additions and 1 deletions

View File

@@ -5,10 +5,13 @@ 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.
mkdir -p ~/.local/share/tetosong/
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/eggs/tetosong.config
fi
mkdir -p ~/.local/share/tetosong/fortunes
mkdir -p ~/.local/share/tetosong/fortunes/tetosotd
curl -sLo ~/.local/share/tetosong/fortunes/tetosotd/tetofortunes https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/eggs/fortunes/tetosotd/tetofortunes
curl -sLo ~/.local/share/tetosong/fortunes/tetosotd/tetofortunes.dat https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/eggs/fortunes/tetosotd/tetofortunes.dat

View File

@@ -15,7 +15,7 @@ fi
# download custom fortunes and config file
echo "Downloading custom fortunes and config file..."
# download the config file and prompt the user for options.
mkdir -p ~/.local/share/tetosong/
curl -sLo ~/.local/share/tetosong/tetosong.config https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/eggs/tetosong.config
read -p "Do you want to hear Teto in your terminal? (y/n) " yn
case $yn in
@@ -29,6 +29,7 @@ case $yn in
[Nn]* ) sed -i 's|^AUTOUPDATE=.*|AUTOUPDATE="NO"|' ~/.local/share/tetosong/tetosong.config ;;
* ) echo "Please answer yes or no.";;
esac
mkdir -p ~/.local/share/tetosong/fortunes
mkdir -p ~/.local/share/tetosong/fortunes/tetosotd
curl -sLo ~/.local/share/tetosong/fortunes/tetosotd/tetofortunes https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/eggs/fortunes/tetosotd/tetofortunes
curl -sLo ~/.local/share/tetosong/fortunes/tetosotd/tetofortunes.dat https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/eggs/fortunes/tetosotd/tetofortunes.dat