mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 21:42:53 -05:00
Finalized config version checker
This commit is contained in:
parent
a827741e69
commit
ee34c250dd
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,5 @@
|
||||||
version="${1:-1.0.2}"
|
version="${1:-1.0.2}"
|
||||||
vernum=$(echo $version | sed 's/[.][.]*//g' )
|
vernum=$(echo $version | sed 's/[.][.]*//g' )
|
||||||
cfgver=2
|
|
||||||
bashrc=~/.bashrc
|
bashrc=~/.bashrc
|
||||||
zshrc=~/.zshrc
|
zshrc=~/.zshrc
|
||||||
originaldir=$PWD
|
originaldir=$PWD
|
||||||
|
@ -46,6 +45,7 @@ then
|
||||||
tput sc
|
tput sc
|
||||||
echo -e "\e[35mwelcome.sh\e[0m already installed!"
|
echo -e "\e[35mwelcome.sh\e[0m already installed!"
|
||||||
if [[ $vernum -gt $(grep version ~/.welcome/welcome.sh | sed 's/.*=//' | sed 's/[.][.]*//g') ]]; then
|
if [[ $vernum -gt $(grep version ~/.welcome/welcome.sh | sed 's/.*=//' | sed 's/[.][.]*//g') ]]; then
|
||||||
|
cfgver=$(echo $(curl -Ls https://github.com/G2-Games/welcome.sh/releases/download/v$version/config.cfg) | grep version | sed 's/.*=//' | sed 's/[.][.]*//g')
|
||||||
echo -en "Do you want to \e[36mupdate \e[35mwelcome.sh\e[0m? (v$(grep version ~/.welcome/welcome.sh | sed 's/.*=//') => v$version) \n\e[36mY/n\e[0m"
|
echo -en "Do you want to \e[36mupdate \e[35mwelcome.sh\e[0m? (v$(grep version ~/.welcome/welcome.sh | sed 's/.*=//') => v$version) \n\e[36mY/n\e[0m"
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue