36b6d086b901486fa5bbf8693edc2fd6f4caf251
[atutor.git] / mods / wiki / plugins / interwiki / metadb-wget.sh
1 #!/bin/sh
2 # This script fetches the MetaWiki database file from our downloads/ dir
3 URL_DOWN="http://erfurtwiki.sourceforge.net/downloads/contrib-add-ons/metadb"
4 URL_MIRR="http://ewiki.berlios.de/metadb"
5 URL_ORIG="http://sunir.org/meatball/MetaWiki/metadb"
6
7 #-- switch to ewiki base, make EWIKI_VAR directory
8 cd `dirname $0`
9 cd ../..
10 [ ! -e var ]   &&   mkdir var   &&   chmod 763 var
11
12 #-- download
13 wget -N $URL_MIRR -O var/metadb ||      \
14 wget -N $URL_DOWN -O var/metadb ||      \
15 wget -N $URL_ORIG -O var/metadb ||      \
16 echo "ERROR fetching latest 'metadb' file"
17
18 #-- compress
19 gzip -7 var/metadb
20