diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-09-07 05:53:56 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-09-07 05:53:56 -0300 |
commit | f7bb3d39f3b79f5f7cbd4e8facb655da616479b8 (patch) | |
tree | 3aeae1c1ac7b8e4e3e04a88fc84be22213dcd472 | |
parent | ec30b5533dbbaa0ea4897f3f1c6c4b68818fdf3e (diff) | |
download | downloaders-f7bb3d39f3b79f5f7cbd4e8facb655da616479b8.tar.gz downloaders-f7bb3d39f3b79f5f7cbd4e8facb655da616479b8.tar.bz2 |
Updates mediawiki_deploy
-rwxr-xr-x | mediawiki-dl | 16 |
1 files changed, 12 insertions, 4 deletions
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 } |