Replace bin only on successful connection
This commit is contained in:
@@ -14,8 +14,11 @@ wx-install(){
|
||||
fi
|
||||
|
||||
mkdir $HOME/bin &> /dev/null
|
||||
curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o $HOME/bin/wx &> /dev/null
|
||||
chmod +x $HOME/bin/wx &> /dev/null
|
||||
if [[ $(curl -s -o /dev/null -w "%{http_code}" https://git.waren.io/warengroup/wx/raw/branch/master/wx) -eq 200 ]]
|
||||
then
|
||||
curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o $HOME/bin/wx &> /dev/null
|
||||
chmod +x $HOME/bin/wx &> /dev/null
|
||||
fi
|
||||
|
||||
CRONJOB_NAME="#Warén CLI: Auto"
|
||||
CRONJOB_TASK="*/5 * * * * $HOME/bin/wx auto"
|
||||
|
7
wx
7
wx
@@ -425,8 +425,11 @@ wx-install(){
|
||||
fi
|
||||
|
||||
mkdir $HOME/bin &> /dev/null
|
||||
curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o $HOME/bin/wx &> /dev/null
|
||||
chmod +x $HOME/bin/wx &> /dev/null
|
||||
if [[ $(curl -s -o /dev/null -w "%{http_code}" https://git.waren.io/warengroup/wx/raw/branch/master/wx) -eq 200 ]]
|
||||
then
|
||||
curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o $HOME/bin/wx &> /dev/null
|
||||
chmod +x $HOME/bin/wx &> /dev/null
|
||||
fi
|
||||
|
||||
CRONJOB_NAME="#Warén CLI: Auto"
|
||||
CRONJOB_TASK="*/5 * * * * $HOME/bin/wx auto"
|
||||
|
Reference in New Issue
Block a user