summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-06 23:15:23 +0100
committermathieui <mathieui@mathieui.net>2013-03-06 23:15:23 +0100
commita6aca8853173a1622f9e5eb668786f16ae1eab01 (patch)
tree88fdaf9874b3d83db977ed26d7cc52047fd271e0 /update.sh
parent370cc874c2dffd6b4fd306213654c355a5ecadf6 (diff)
downloadpoezio-a6aca8853173a1622f9e5eb668786f16ae1eab01.tar.gz
poezio-a6aca8853173a1622f9e5eb668786f16ae1eab01.tar.bz2
poezio-a6aca8853173a1622f9e5eb668786f16ae1eab01.tar.xz
poezio-a6aca8853173a1622f9e5eb668786f16ae1eab01.zip
Upgrade update.sh to stop when an update fails
(and tell what is failing)
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/update.sh b/update.sh
index 7aff4082..8f606f92 100755
--- a/update.sh
+++ b/update.sh
@@ -6,8 +6,14 @@
# 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'
-git pull origin master
+git pull origin master || error poezio
make
if [ $? -ne 0 ]
@@ -23,18 +29,18 @@ then
echo "Removing the old SleekXMPP"
rm -rf 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
if [ -e "Sleek" ]
then
echo "Updating SleekXMPP"
cd Sleek
- git pull
+ git pull || error SleekXMPP
cd ..
else
echo "Downloading SleekXMPP"
- git clone https://github.com/fritzy/SleekXMPP.git Sleek
+ git clone https://github.com/fritzy/SleekXMPP.git Sleek || error SleekXMPP
fi
if [ -e ".dnspython.tgz" ]
@@ -49,7 +55,7 @@ then
fi
else
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
tar xfz .dnspython.tgz
mv dnspython3-1.10.0 dnspython