mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 05:22:53 -05:00
Updated installer to download itself properly
This commit is contained in:
parent
4e5b2a848e
commit
68ab6a6310
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,7 @@ uninstall () {
|
||||||
echo "Goodbye. Uninstalling..."
|
echo "Goodbye. Uninstalling..."
|
||||||
tput sc
|
tput sc
|
||||||
rm ~/.welcome/welcome.sh 2> /dev/null
|
rm ~/.welcome/welcome.sh 2> /dev/null
|
||||||
|
rm ~/.welcome/install.sh 2> /dev/null
|
||||||
rm ~/.welcome/config.cfg 2> /dev/null
|
rm ~/.welcome/config.cfg 2> /dev/null
|
||||||
rm ~/.welcome/config_old.cfg 2> /dev/null
|
rm ~/.welcome/config_old.cfg 2> /dev/null
|
||||||
rm -r ~/.welcome
|
rm -r ~/.welcome
|
||||||
|
@ -62,8 +63,10 @@ update () {
|
||||||
tput sc
|
tput sc
|
||||||
mkdir -p ~/.welcome
|
mkdir -p ~/.welcome
|
||||||
rm ~/.welcome/welcome.sh
|
rm ~/.welcome/welcome.sh
|
||||||
|
rm ~/.welcome/install.sh
|
||||||
|
|
||||||
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v"${version}"/welcome.sh --output ~/.welcome/welcome.sh
|
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v"${version}"/welcome.sh --output ~/.welcome/welcome.sh
|
||||||
|
curl -SL https://raw.githubusercontent.com/G2-Games/welcome.sh/main/install.sh --output ~/.welcome/install.sh
|
||||||
if [[ $vernum -ge 100 ]] && [[ $overcfg -gt 0 ]]; then
|
if [[ $vernum -ge 100 ]] && [[ $overcfg -gt 0 ]]; then
|
||||||
echo "Backing up: config.cfg >> config_old.cfg"
|
echo "Backing up: config.cfg >> config_old.cfg"
|
||||||
mv ~/.welcome/config.cfg ~/.welcome/config_old.cfg
|
mv ~/.welcome/config.cfg ~/.welcome/config_old.cfg
|
||||||
|
@ -135,6 +138,8 @@ if ! grep -qs 'bash ~/.welcome/welcome.sh' $bashrc && ! grep -qs 'zsh ~/.welcome
|
||||||
cd ~/ || exit 1
|
cd ~/ || exit 1
|
||||||
mkdir -p ~/.welcome
|
mkdir -p ~/.welcome
|
||||||
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v"${version}"/welcome.sh --output ~/.welcome/welcome.sh
|
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v"${version}"/welcome.sh --output ~/.welcome/welcome.sh
|
||||||
|
curl -SL https://raw.githubusercontent.com/G2-Games/welcome.sh/main/install.sh --output ~/.welcome/install.sh
|
||||||
|
|
||||||
if [[ $vernum -ge 100 ]]; then
|
if [[ $vernum -ge 100 ]]; then
|
||||||
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v"${version}"/config.cfg --output ~/.welcome/config.cfg
|
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v"${version}"/config.cfg --output ~/.welcome/config.cfg
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue