From: Silvio Rhatto Date: Thu, 7 Sep 2017 08:53:56 +0000 (-0300) Subject: Updates mediawiki_deploy X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f7bb3d39f3b79f5f7cbd4e8facb655da616479b8;p=downloaders.git Updates mediawiki_deploy --- diff --git a/mediawiki-dl b/mediawiki-dl index c904a70..e899e42 100755 --- a/mediawiki-dl +++ b/mediawiki-dl @@ -27,11 +27,19 @@ function mediawiki_deploy { exit fi - $sudo wget $RELEASES/$MAJOR_VERSION/$TARBALL || exit 1 - $sudo wget $RELEASES/$MAJOR_VERSION/$TARBALL.sig || exit 1 + $sudo wget -c $RELEASES/$MAJOR_VERSION/$TARBALL || exit 1 + $sudo wget -c $RELEASES/$MAJOR_VERSION/$TARBALL.sig || exit 1 gpg --verify $TARBALL.sig $TARBALL - $sudo tar xvf $TARBALL || exit 1 - $sudo chown -R root. mediawiki-$VERSION || exit 1 + + # Use --no-same-owner ensures tar doesn't fail if + # extracting to a file system that doesn't accept + # ownership change + $sudo tar --no-same-owner -xvf $TARBALL || exit 1 + + # In some filesystems we won't be able to change ownership, so + # that's why we're ignoring errors + $sudo chown -R root. mediawiki-$VERSION &> /dev/null + $sudo rm $TARBALL* $sudo ln -sf mediawiki-$VERSION mediawiki }