From 8f1a563bf013e27320d71f65e4a078e46b7426a6 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Wed, 29 May 2024 16:16:42 +0200 Subject: [PATCH] Updates --- setup.sh | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/setup.sh b/setup.sh index 319f7a4..8f16612 100755 --- a/setup.sh +++ b/setup.sh @@ -73,6 +73,26 @@ while true; do esac done +# Remove existing download folder and zip files +if [ -f $HOME/Downloads/dotfiles-main.zip ] ;then + rm $HOME/Downloads/dotfiles-main.zip +fi +if [ -f $HOME/Downloads/dotfiles-dev.zip ] ;then + rm $HOME/Downloads/dotfiles-dev.zip +fi +if [ -f $HOME/Downloads/dotfiles.zip ] ;then + rm $HOME/Downloads/dotfiles.zip +fi +if [ -d $HOME/Downloads/dotfiles ] ;then + rm -rf $HOME/Downloads/dotfiles +fi +if [ -d $HOME/Downloads/dotfiles-main ] ;then + rm -rf $HOME/Downloads/dotfiles-main +fi +if [ -d $HOME/Downloads/dotfiles-dev ] ;then + rm -rf $HOME/Downloads/dotfiles-dev +fi + # Synchronizing package databases sudo pacman -Sy echo @@ -112,15 +132,5 @@ echo ":: Unzip complete." cd $HOME/Downloads/dotfiles-$v echo ":: Changed into ~/Downloads/dotfiles-$v/" echo -# Start the installatiom -if gum confirm "DO YOU WANT TO START THE INSTALLATION NOW?" ;then - echo - gum spin --spinner dot --title "Starting the installation now..." -- sleep 3 - ./install.sh -elif [ $? -eq 130 ]; then - exit 130 -else - echo ":: Installation canceled." - echo "You can also start the installation manually with ~/Downloads/dotfiles-$version/install.sh" - exit; -fi \ No newline at end of file +gum spin --spinner dot --title "Starting the installation now..." -- sleep 3 +./install.sh \ No newline at end of file