1
1
Fork 0
mirror of https://github.com/G2-Games/welcome.sh.git synced 2025-05-01 02:52:52 -05:00

Updated shell detection for installer, should work on Macs now

This commit is contained in:
G2-Games 2022-09-18 17:53:38 -05:00
parent 87e4668f99
commit 8f7fc68ea1

View file

@ -2,7 +2,7 @@ version=0.2.5
bashrc="/home/$USER/.bashrc" bashrc="/home/$USER/.bashrc"
zshrc="/home/$USER/.zshrc" zshrc="/home/$USER/.zshrc"
originaldir=$PWD originaldir=$PWD
environment=$(readlink /proc/$$/exe | grep -o 'bash\|zsh') environment=$(ps -o args= -p $$ | egrep -m 1 -o '\w{0,5}sh')
if [[ "$environment" = "bash" ]] || [[ "$environment" = "zsh" ]]; if [[ "$environment" = "bash" ]] || [[ "$environment" = "zsh" ]];
then then
if ! grep -q 'bash /home/$USER/.welcome/welcome.sh' $bashrc && ! grep -q 'zsh /home/$USER/.welcome/welcome.sh' $zshrc; if ! grep -q 'bash /home/$USER/.welcome/welcome.sh' $bashrc && ! grep -q 'zsh /home/$USER/.welcome/welcome.sh' $zshrc;