local url=$1
local original_pwd="$PWD"
local name
- local re='[^/]*/[^/]*$'
+ local re='[^/]*/[^/]*$' # last 2 parts of path
[[ $url =~ $re ]] ||:
target=$mw/${BASH_REMATCH[0]}
if [[ ! -e $target/.git ]]; then
}
mw-ext () {
local ext
- for ext in "$@"; do
+ for ext; do
mw-clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/$ext
- if [[ -e $mw/ext/$ext/extension.json ]]; then
- # new style extension. remove old style declaration
- sed -i --follow-symlinks '#^require_once( "\\\$IP/extensions/\$ext/\$ext\.php" );#d' $mwc
+ if [[ -e $mw/extensions/$ext/extension.json ]]; then
+ # new style extension
teeu $mwc <<EOF
wfLoadExtension( '$ext' );
EOF
# git branch -r
git checkout -f origin/$mw_branch
git clean -ffxd
-# add some librejs support:
-curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-librejs-patch;hb=HEAD" | bash
+# apply librejs patch
+curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-1.28-librejs.patch;hb=HEAD" | patch -r - -N -p1
# Get the php libraries wmf uses. Based on:
# https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries
if [[ ! -e vendor/.git ]]; then
update "$dir" ||:
done
if update .; then
- curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-librejs-patch;hb=HEAD" | bash
+ curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-1.28-librejs.patch;hb=HEAD" | patch -r - -N -p1
fi
php $mw/maintenance/update.php -q --quick
EOF
local url=$1
local original_pwd="$PWD"
local name
- local re='[^/]*/[^/]*$'
+ local re='[^/]*/[^/]*$' # last 2 parts of path
[[ $url =~ $re ]] ||:
target=$mw/${BASH_REMATCH[0]}
if [[ ! -e $target/.git ]]; then
}
mw-ext () {
local ext
- for ext in "$@"; do
+ for ext; do
mw-clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/$ext
- if [[ -e $mw/ext/$ext/extension.json ]]; then
- # new style extension. remove old style declaration
- sed -i --follow-symlinks '#^require_once( "\\\$IP/extensions/\$ext/\$ext\.php" );#d' $mwc
+ if [[ -e $mw/extensions/$ext/extension.json ]]; then
+ # new style extension
teeu $mwc <<EOF
wfLoadExtension( '$ext' );
EOF
# git branch -r
git checkout -f origin/$mw_branch
git clean -ffxd
-# add some librejs support:
-curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-librejs-patch;hb=HEAD" | bash
+# apply librejs patch
+curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-1.28-librejs.patch;hb=HEAD" | patch -r - -N -p1
# Get the php libraries wmf uses. Based on:
# https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries
if [[ ! -e vendor/.git ]]; then
update "$dir" ||:
done
if update .; then
- curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-librejs-patch;hb=HEAD" | bash
+ curl "https://iankelling.org/git/?p=mediawiki-librejs-patch;a=blob_plain;f=mediawiki-1.28-librejs.patch;hb=HEAD" | patch -r - -N -p1
fi
php $mw/maintenance/update.php -q --quick
EOF