mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 13:32:53 -05:00
Update install.sh
This commit is contained in:
parent
51159c3b39
commit
b3ab8b3b04
1 changed files with 0 additions and 7 deletions
|
@ -73,13 +73,6 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -a "~/.welcome/welcome.sh" ]]; then # Check if update succeeded
|
|
||||||
rm ~/.welcome/welcome.sh.bkup
|
|
||||||
else
|
|
||||||
mv ~/.welcome/welcome.sh.bkup ~/.welcome/welcome.sh
|
|
||||||
echo "Update failed! Restoring..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for older versions and replace bashrc lines
|
# Check for older versions and replace bashrc lines
|
||||||
lines=$(grep -sn 'bash ~/.welcome/welcome.sh' $bashrc | sed -e 's/:.*//g' && grep -sn 'bash /home/$USER/.welcome/welcome.sh' $bashrc | sed -e 's/:.*//g')
|
lines=$(grep -sn 'bash ~/.welcome/welcome.sh' $bashrc | sed -e 's/:.*//g' && grep -sn 'bash /home/$USER/.welcome/welcome.sh' $bashrc | sed -e 's/:.*//g')
|
||||||
lines=$(printf '%s\n' "$( echo "$lines" )" | sort | tac | tr '\n' ' '; echo)
|
lines=$(printf '%s\n' "$( echo "$lines" )" | sort | tac | tr '\n' ' '; echo)
|
||||||
|
|
Loading…
Reference in a new issue