update your wiki, now and then
once, in a while, there’s the inevitable thing to do: you have to update your mediawiki. this is a rather cumbersome work, especially if you have customized your wiki beyond sanity (well, it’s cumbersome even if you haven’t). so what we need is a cute little patch, not the whole dirty tarball. however, the mediawiki folks don’t provide patches.
after losing my first and writing my second “make-mediawiki-patch” script i thought, i’d save it here and other people might like it, too. it’s from neingeist’s dirty-little-helpers-with-no-brain department.
#!/bin/bash sfmirror=http://mesh.dl.sourceforge.net/sourceforge/ from=$1 to=$2 if [ -z "$to" ]; then echo "Usage: $0 x.x.x y.y.y" exit fi tmpdir=`mktemp -d /tmp/mediawiki-XXXXXX` && cd $tmpdir wget -c "$sfmirror/wikipedia/mediawiki-$from.tar.gz" wget -c "$sfmirror/wikipedia/mediawiki-$to.tar.gz" tar xzf "mediawiki-$from.tar.gz" tar xzf "mediawiki-$to.tar.gz" diff -uNr "mediawiki-$from/" "mediawiki-$to/" > "mediawiki-patch-$from-$to.diff" echo "Truth lieth in $tmpdir."