From 6a6c0449e613a43912a1137cb7789eb8ee7e3e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dias?= Date: Fri, 26 Jul 2024 19:03:29 -0300 Subject: [PATCH] :wrench: chore(apply.sh): fixed functions and function calls --- apply.sh | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/apply.sh b/apply.sh index 4932fa2..8d0bae4 100755 --- a/apply.sh +++ b/apply.sh @@ -7,41 +7,44 @@ echo "######################################"; printf "\n"; -echo "Welcome to my dotfiles installation script!"; +echo "Welcome to my dotfiles installation script!" # Say that dotfiles aren't ready to use yet and exit -echo "Oh oh! Looks like my Dotfiles aren't ready to use yet! Try again later... exiting."; -printf "\n"; -exit 0; +echo "Oh oh! Looks like my Dotfiles aren't ready to use yet! Try again later... exiting." +printf "\n" +exit 0 - -echo -n "Do you want to install the dotfiles? [y/n] "; -read input; - -if ($input == "y" || $input == "yes") -then - install() -else - exit 0 -fi - -function install() { - - printf "\n"; - echo "Making backup before installing dotfiles..."; +function backup_previous_dotfiles { + echo "Making backup before installing dotfiles..." # Do backup steps here - echo "Finished backup."; + echo "Finished backup." +} + +function apply_dotfiles { - printf "\n"; + printf "\n" + backup_previous_dotfiles + printf "\n" + + printf "Starting dotfiles installation...\n" - echo "Starting dotfiles installation..."; - echo "[info] Installing waybar theme"; echo "[info] Installing Hyprland configs" echo "[info] Installing wofi stylesheet" echo "Ah yes! Looks like it's ready to use! If you find any issue, report at: https://github.com/retrozinndev/Hyprland-Dots/issues " - echo "Thanks for using my dotfiles! I'm really happy for that :3" + echo "Thanks for using my dotfiles! I'm really happy with that :3" } +echo -n "Do you want to install the dotfiles? [y/n] " +read input + +if [[ $input = "y" ]] || [[ $input = "yes" ]] +then + apply_dotfiles +else + printf "Ok, doing as you said! Bye bye!\n" + exit 0 +fi + printf "\n"