fix install and update
no tetosong folder = cant download config
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user