xdebug.sh 620 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. # The problem is that we do not want to remove the configuration file, just disable it for a few tasks, then enable it
  3. #
  4. # For reference, see
  5. #
  6. # - https://docs.travis-ci.com/user/languages/php#Disabling-preinstalled-PHP-extensions
  7. # - https://docs.travis-ci.com/user/languages/php#Custom-PHP-configuration
  8. config="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini"
  9. function xdebug-disable() {
  10. if [[ -f $config ]]; then
  11. mv $config "$config.bak"
  12. fi
  13. }
  14. function xdebug-enable() {
  15. if [[ -f "$config.bak" ]]; then
  16. mv "$config.bak" $config
  17. fi
  18. }