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.

initBenchmark.sh 509B

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