mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 13:32:53 -05:00
Made uninstallation work on MacOS
This commit is contained in:
parent
f2f8d567db
commit
804aa8701f
1 changed files with 4 additions and 3 deletions
|
@ -58,12 +58,13 @@ then
|
||||||
line=$(grep -n 'bash ~/.welcome/welcome.sh' $bashrc)
|
line=$(grep -n 'bash ~/.welcome/welcome.sh' $bashrc)
|
||||||
line=${line%:*}
|
line=${line%:*}
|
||||||
sed -i "${line}d" $bashrc
|
sed -i "${line}d" $bashrc
|
||||||
|
sed "${line}d" $bashrc > file.tmp && mv file.tmp $bashrc
|
||||||
fi
|
fi
|
||||||
if grep -n 'zsh ~/.welcome/welcome.sh' $zshrc ;
|
if grep -n 'zsh ~/.welcome/welcome.sh' $zshrc ;
|
||||||
then
|
then
|
||||||
line=$(grep -n 'zsh ~/.welcome/welcome.sh' $zshrc)
|
line=$(grep -n 'zsh ~/.welcome/welcome.sh' $zshrc)
|
||||||
line=${line%:*}
|
line=${line%:*}
|
||||||
sed -i "${line}d" $zshrc
|
sed "${line}d" $zshrc > file.tmp && mv file.tmp $zshrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for older versions #
|
# Check for older versions #
|
||||||
|
@ -71,13 +72,13 @@ then
|
||||||
then
|
then
|
||||||
line=$(grep -n 'bash /home/$USER/.welcome/welcome.sh' $bashrc)
|
line=$(grep -n 'bash /home/$USER/.welcome/welcome.sh' $bashrc)
|
||||||
line=${line%:*}
|
line=${line%:*}
|
||||||
sed -i "${line}d" $bashrc
|
sed "${line}d" $bashrc > file.tmp && mv file.tmp $bashrc
|
||||||
fi
|
fi
|
||||||
if grep -n 'zsh /home/$USER/.welcome/welcome.sh' $zshrc ;
|
if grep -n 'zsh /home/$USER/.welcome/welcome.sh' $zshrc ;
|
||||||
then
|
then
|
||||||
line=$(grep -n 'zsh /home/$USER/.welcome/welcome.sh' $zshrc)
|
line=$(grep -n 'zsh /home/$USER/.welcome/welcome.sh' $zshrc)
|
||||||
line=${line%:*}
|
line=${line%:*}
|
||||||
sed -i "${line}d" $zshrc
|
sed "${line}d" $zshrc > file.tmp && mv file.tmp $zshrc
|
||||||
fi
|
fi
|
||||||
# End older version check #
|
# End older version check #
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue