Browse Source

add add_extension script

dev
Adrian Malacoda 2 years ago
parent
commit
6bde45cc79
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      scripts/add_extension.sh

+ 22
- 0
scripts/add_extension.sh View File

@ -0,0 +1,22 @@
#!/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

Loading…
Cancel
Save