Skip to content

Instantly share code, notes, and snippets.

@JeroenDeDauw
Last active August 7, 2020 17:01
Show Gist options
  • Save JeroenDeDauw/49a3858653ff4b5be7ec849019ede06c to your computer and use it in GitHub Desktop.
Save JeroenDeDauw/49a3858653ff4b5be7ec849019ede06c to your computer and use it in GitHub Desktop.
#! /bin/bash
MW_BRANCH=$1
EXTENSION_NAME=$2
wget https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz -nv
tar -zxf $MW_BRANCH.tar.gz
mv mediawiki-$MW_BRANCH mediawiki
cd mediawiki
composer install
php maintenance/install.php --dbtype sqlite --dbuser root --dbname mw --dbpath $(pwd) --pass AdminPassword WikiName AdminUser
cat <<EOT >> composer.local.json
{
"extra": {
"merge-plugin": {
"merge-dev": true,
"include": [
"extensions/$EXTENSION_NAME/composer.json"
]
}
}
}
EOT
echo 'error_reporting(E_ALL| E_STRICT);' >> LocalSettings.php
echo 'ini_set("display_errors", 1);' >> LocalSettings.php
echo '$wgShowExceptionDetails = true;' >> LocalSettings.php
echo '$wgShowDBErrorBacktrace = true;' >> LocalSettings.php
echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php
echo 'wfLoadExtension( "'$EXTENSION_NAME'" );' >> LocalSettings.php
tail -n5 LocalSettings.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment