mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 05:22:53 -05:00
Fixed overwriting config.cfg
This commit is contained in:
parent
1bdf2a6ff6
commit
d28195b401
1 changed files with 4 additions and 6 deletions
10
install.sh
10
install.sh
|
@ -49,8 +49,7 @@ then
|
||||||
if [[ "$environment" = "bash" ]]; then read -p " " -n 1 -r;
|
if [[ "$environment" = "bash" ]]; then read -p " " -n 1 -r;
|
||||||
elif [[ "$environment" = "zsh" ]]; then read -q "REPLY? " -n 1 -r; fi
|
elif [[ "$environment" = "zsh" ]]; then read -q "REPLY? " -n 1 -r; fi
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
then
|
|
||||||
tput rc el ed
|
tput rc el ed
|
||||||
echo "Updating..."
|
echo "Updating..."
|
||||||
tput sc
|
tput sc
|
||||||
|
@ -58,13 +57,13 @@ then
|
||||||
if which curl >/dev/null ;
|
if which curl >/dev/null ;
|
||||||
then
|
then
|
||||||
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
|
||||||
if ! [[ -a "~/.welcome/config.cfg" ]] && [[ $vernum -ge 100 ]]; then
|
if ! [ -a ~/.welcome/config.cfg ] && [[ $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
|
||||||
elif which wget >/dev/null ;
|
elif which wget >/dev/null ;
|
||||||
then
|
then
|
||||||
wget https://github.com/G2-Games/welcome.sh/releases/download/v${version}/welcome.sh --P ~/.welcome/
|
wget https://github.com/G2-Games/welcome.sh/releases/download/v${version}/welcome.sh --P ~/.welcome/
|
||||||
if ! [[ -a "~/.welcome/config.cfg" ]] && [[ $vernum -ge 100 ]]; then
|
if ! [ -a ~/.welcome/config.cfg ] && [[ $vernum -ge 100 ]]; then
|
||||||
wget https://github.com/G2-Games/welcome.sh/releases/download/v${version}/config.cfg --P ~/.welcome/
|
wget https://github.com/G2-Games/welcome.sh/releases/download/v${version}/config.cfg --P ~/.welcome/
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -99,8 +98,7 @@ then
|
||||||
if [[ "$environment" = "bash" ]]; then read -p " " -n 1 -r;
|
if [[ "$environment" = "bash" ]]; then read -p " " -n 1 -r;
|
||||||
elif [[ "$environment" = "zsh" ]]; then read -q "REPLY? " -n 1 -r; fi
|
elif [[ "$environment" = "zsh" ]]; then read -q "REPLY? " -n 1 -r; fi
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
then
|
|
||||||
tput rc el ed
|
tput rc el ed
|
||||||
echo "Goodbye. Uninstalling..."
|
echo "Goodbye. Uninstalling..."
|
||||||
tput sc
|
tput sc
|
||||||
|
|
Loading…
Reference in a new issue