update.sh 521 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. ## https://social.jeroened.be/display/cd9f100a165b8c276118c9f802432799
  3. ## Get variables
  4. webroot=${1}
  5. if [[ ${webroot} == "" ]]; then
  6. webroot=${PWD}
  7. fi
  8. ## initialize
  9. cd ${webroot}
  10. bash bin/console maintenance 1 || exit 1
  11. ## Core update
  12. git pull --ff-only || exit 2
  13. php bin/composer.phar install --optimize-autoloader --no-dev || exit 3
  14. bash bin/console dbstructure update || exit 1
  15. ## Addon update
  16. cd addon
  17. git pull --ff-only || exit 2
  18. ## finalize
  19. cd ${webroot}
  20. bash bin/console maintenance 0 || exit 1