From c258c5ce2d7d30a086ac8d08f92f349dcd7372bf Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 4 Sep 2022 15:56:23 -0500 Subject: [PATCH] Fixed fatal error in installer --- install.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 8c495c5..1575289 100755 --- a/install.sh +++ b/install.sh @@ -41,12 +41,18 @@ then then rm /home/$USER/.welcome/welcome.sh rmdir /home/$USER/.welcome - line=$(grep -n 'bash /home/$USER/.welcome/welcome.sh' $bashrc) - line=${line%:*} - sed -i "${line}d" $bashrc - line=$(grep -n 'zsh /home/$USER/.welcome/welcome.sh' $zshrc) - line=${line%:*} - sed -i "${line}d" $zshrc + if grep -n 'bash /home/$USER/.welcome/welcome.sh' $bashrc ; + then + line=$(grep -n 'bash /home/$USER/.welcome/welcome.sh' $bashrc) + line=${line%:*} + sed -i "${line}d" $bashrc + fi + if grep -n 'zsh /home/$USER/.welcome/welcome.sh' $zshrc ; + then + line=$(grep -n 'zsh /home/$USER/.welcome/welcome.sh' $zshrc) + line=${line%:*} + sed -i "${line}d" $zshrc + fi tput rc el ed echo -e "\e[36mUninstalled! \e[0m" else