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.

add_extension.sh 530B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. EXT_NAME=$1
  3. EXT_VERSION=$2
  4. cd "${WIKI_SOURCE}/extensions"
  5. if [[ -e "${EXT_NAME}" ]]; then
  6. cp -Rv "${EXT_NAME}" .
  7. cd "$(basename ${EXT_NAME})"
  8. else
  9. git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/${EXT_NAME}"
  10. cd "${EXT_NAME}"
  11. fi
  12. if [[ "${EXT_VERSION}" ]]; then
  13. git checkout -b "${EXT_VERSION}" "origin/${EXT_VERSION}"
  14. fi
  15. if [[ -e ".git" ]]; then
  16. git submodule update --init
  17. fi
  18. if [[ -e "composer.json" ]]; then
  19. composer install --no-dev
  20. fi
  21. chown -R www-data:www-data .