aboutsummaryrefslogtreecommitdiff
path: root/mediawiki-dl
diff options
context:
space:
mode:
Diffstat (limited to 'mediawiki-dl')
-rwxr-xr-xmediawiki-dl16
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
}