n98-magerun2 758 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if ! bin/cliq ls bin/n98-magerun2.phar; then
  3. echo "Downloading n98-magerun2.phar, just a moment..."
  4. bin/clinotty curl -sS -O https://files.magerun.net/n98-magerun2.phar
  5. bin/clinotty curl -sS -o n98-magerun2.phar.sha256 https://files.magerun.net/sha256.php?file=n98-magerun2.phar
  6. bin/clinotty shasum -a 256 -c n98-magerun2.phar.sha256
  7. [ $? != 0 ] && echo "sha256 checksum do not match!" && exit
  8. bin/cliq chmod +x n98-magerun2.phar
  9. bin/cliq mkdir -p bin
  10. bin/cliq mv n98-magerun2.phar bin
  11. fi
  12. S=$(bin/cli cat /usr/local/etc/php/php.ini | grep -iGc 'xdebug.mode = off');
  13. if [[ $S == 1 ]]; then
  14. bin/cli bin/n98-magerun2.phar "$@"
  15. else
  16. bin/cli php -dxdebug.mode=debug -dxdebug.start_with_request=yes bin/n98-magerun2.phar "$@"
  17. fi