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.

init_benchmark.sh 534B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. function clearCacheAndLogs() {
  3. sudo /bin/rm -rf var/cache/*
  4. [ "$?" != "0" ] && exit 1
  5. sudo /bin/chmod -R 777 var/cache
  6. [ "$?" != "0" ] && exit 1
  7. sudo /bin/rm -rf var/log/*
  8. [ "$?" != "0" ] && exit 1
  9. sudo /bin/chmod -R 777 var/log
  10. [ "$?" != "0" ] && exit 1
  11. php bin/console cache:warmup
  12. }
  13. function init() {
  14. export APP_ENV=$2
  15. clearCacheAndLogs
  16. composer install --no-dev --classmap-authoritative
  17. [ "$?" != "0" ] && exit 1
  18. clearCacheAndLogs
  19. return 0
  20. }