You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
439 B

#!/bin/bash
EXT_NAME=$1
EXT_VERSION=$2
cd "${WIKI_SOURCE}/extensions"
if [[ -e "${EXT_NAME}" ]]; then
cp -Rv "${EXT_NAME}" .
cd "$(basename ${EXT_NAME})"
else
git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/${EXT_NAME}"
cd "${EXT_NAME}"
fi
if [[ "${EXT_VERSION}" ]]; then
git checkout -b "${EXT_VERSION}" "origin/${EXT_VERSION}"
fi
if [[ -e "composer.json" ]]; then
composer install --no-dev
fi