Upgrade update.sh to stop when an update fails
(and tell what is failing)
This commit is contained in:
parent
370cc874c2
commit
a6aca88531
1 changed files with 11 additions and 5 deletions
16
update.sh
16
update.sh
|
@ -6,8 +6,14 @@
|
||||||
|
|
||||||
# Use launch.sh to start poezio directly from here
|
# Use launch.sh to start poezio directly from here
|
||||||
|
|
||||||
|
function error() {
|
||||||
|
echo -e "\033[1;31mThe script failed to update $1.\033[0m"
|
||||||
|
echo -e "\033[1;31mPlease investigate.\033[0m"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
echo 'Updating poezio'
|
echo 'Updating poezio'
|
||||||
git pull origin master
|
git pull origin master || error poezio
|
||||||
|
|
||||||
make
|
make
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
|
@ -23,18 +29,18 @@ then
|
||||||
echo "Removing the old SleekXMPP"
|
echo "Removing the old SleekXMPP"
|
||||||
rm -rf SleekXMPP
|
rm -rf SleekXMPP
|
||||||
rm src/sleekxmpp
|
rm src/sleekxmpp
|
||||||
git clone https://github.com/fritzy/SleekXMPP.git Sleek
|
git clone https://github.com/fritzy/SleekXMPP.git Sleek || error SleekXMPP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "Sleek" ]
|
if [ -e "Sleek" ]
|
||||||
then
|
then
|
||||||
echo "Updating SleekXMPP"
|
echo "Updating SleekXMPP"
|
||||||
cd Sleek
|
cd Sleek
|
||||||
git pull
|
git pull || error SleekXMPP
|
||||||
cd ..
|
cd ..
|
||||||
else
|
else
|
||||||
echo "Downloading SleekXMPP"
|
echo "Downloading SleekXMPP"
|
||||||
git clone https://github.com/fritzy/SleekXMPP.git Sleek
|
git clone https://github.com/fritzy/SleekXMPP.git Sleek || error SleekXMPP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e ".dnspython.tgz" ]
|
if [ -e ".dnspython.tgz" ]
|
||||||
|
@ -49,7 +55,7 @@ then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Downloading dnspython"
|
echo "Downloading dnspython"
|
||||||
wget -c -q -O .dnspython.tgz http://www.dnspython.org/kits3/1.10.0/dnspython3-1.10.0.tar.gz
|
wget -c -q -O .dnspython.tgz http://www.dnspython.org/kits3/1.10.0/dnspython3-1.10.0.tar.gz || error dnspython
|
||||||
rm -fr dnspython
|
rm -fr dnspython
|
||||||
tar xfz .dnspython.tgz
|
tar xfz .dnspython.tgz
|
||||||
mv dnspython3-1.10.0 dnspython
|
mv dnspython3-1.10.0 dnspython
|
||||||
|
|
Loading…
Reference in a new issue