UUGRN:Dienste/Wiki/extensions/update.sh

Aus UUGRN
< UUGRN:Dienste‎ | Wiki‎ | extensions
Version vom 9. Februar 2012, 22:07 Uhr von Rabe (Diskussion | Beiträge) (script zum installieren und updaten von extensions)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
#! /bin/sh

cd -P "$(dirname "$0")"

VERSION=branches/REL1_18
BASE_URL="http://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdist_version=${VERSION}&extdist_submit=Continue&extdist_extension="
UA='--user-agent="Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"'

EXTENSIONS=""
EXTENSIONS="${EXTENSIONS} CategoryTree"
EXTENSIONS="${EXTENSIONS} CheckUser"
EXTENSIONS="${EXTENSIONS} Cite"
EXTENSIONS="${EXTENSIONS} ConfirmEdit"
EXTENSIONS="${EXTENSIONS} Gadgets"
EXTENSIONS="${EXTENSIONS} ImageMap"
EXTENSIONS="${EXTENSIONS} Nuke"
EXTENSIONS="${EXTENSIONS} ParserFunctions"
EXTENSIONS="${EXTENSIONS} RSS"
EXTENSIONS="${EXTENSIONS} Renameuser"
EXTENSIONS="${EXTENSIONS} SubPageList3"
EXTENSIONS="${EXTENSIONS} UploadCSV"
EXTENSIONS="${EXTENSIONS} Vector"
EXTENSIONS="${EXTENSIONS} WikiEditor"

for EXT in ${EXTENSIONS} ; do 
        echo "$0: Updating ${EXT}"
        URL="${BASE_URL}${EXT}"
        TGZ="$(wget ${UA} -O - -q "${URL}" | grep -o 'http://upload.wikimedia.org/ext-dist/[^/"<]*' | sort -u| head -n 1)"
        echo "$0: ${EXT}: Fetch and unpack ${TGZ}"
        wget ${UA} -O - -q "${TGZ}" | tar xvfz - 
done