Fixed install when older version than 1.0 specified

This commit is contained in:
G2-Games 2022-09-19 16:32:12 -05:00
parent 7ae07f7650
commit 031b03d197

View file

@ -14,11 +14,15 @@ then
if which curl >/dev/null ;
then
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v${version}/welcome.sh --output ~/.welcome/welcome.sh
if [[ $(echo $version | sed 's/[.][.]*//g' ) -ge 100 ]]; then
curl -SL https://github.com/G2-Games/welcome.sh/releases/download/v${version}/config.cfg --output ~/.welcome/config.cfg
fi
elif which wget >/dev/null ;
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}/config.cfg --P ~/.welcome/
if [[ $(echo $version | sed 's/[.][.]*//g' ) -ge 100 ]]; then
wget https://github.com/G2-Games/welcome.sh/releases/download/v${version}/config.cfg --P ~
fi
else
echo "Cannot download, neither wget nor curl is available."
exit 1