From d26792dfcc4240669095652fd5aedc14cce9f4f6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 1 Apr 2015 15:50:00 -0300 Subject: Basic error handling at mediawiki-dl --- mediawiki-dl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mediawiki-dl b/mediawiki-dl index 5b86a6c..8535e30 100755 --- a/mediawiki-dl +++ b/mediawiki-dl @@ -23,12 +23,12 @@ function mediawiki_deploy { exit 1 fi - $sudo wget $RELEASES/$MAJOR_VERSION/$TARBALL - $sudo wget $RELEASES/$MAJOR_VERSION/$TARBALL.sig + $sudo wget $RELEASES/$MAJOR_VERSION/$TARBALL || exit 1 + $sudo wget $RELEASES/$MAJOR_VERSION/$TARBALL.sig || exit 1 gpg --verify $TARBALL.sig $TARBALL - $sudo tar xvf $TARBALL - $sudo chown -R root. mediawiki-$VERSION - rm $TARBALL* + $sudo tar xvf $TARBALL || exit 1 + $sudo chown -R root. mediawiki-$VERSION || exit 1 + $sudo rm $TARBALL* $sudo ln -sf mediawiki-$VERSION mediawiki } -- cgit v1.2.3