]> gitweb.fluxo.info Git - downloaders.git/commitdiff
Updates mediawiki_deploy
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Sep 2017 08:53:56 +0000 (05:53 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Sep 2017 08:53:56 +0000 (05:53 -0300)
mediawiki-dl

index c904a70ed0a6a8a19d734e087d8e29f04cc0e07e..e899e42bd1f6c66c04927468c5d46a229682c1a9 100755 (executable)
@@ -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
 }