zf.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh
  2. #############################################################################
  3. # Zend Framework
  4. #
  5. # LICENSE
  6. #
  7. # This source file is subject to the new BSD license that is bundled
  8. # with this package in the file LICENSE.txt.
  9. # It is also available through the world-wide-web at this URL:
  10. # http://framework.zend.com/license/new-bsd
  11. # If you did not receive a copy of the license and are unable to
  12. # obtain it through the world-wide-web, please send an email
  13. # to license@zend.com so we can send you a copy immediately.
  14. #
  15. # Zend
  16. # Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  17. # http://framework.zend.com/license/new-bsd New BSD License
  18. #############################################################################
  19. # find php: pear first, command -v second, straight up php lastly
  20. if test "@php_bin@" != '@'php_bin'@'; then
  21. PHP_BIN="@php_bin@"
  22. elif command -v php 1>/dev/null 2>/dev/null; then
  23. PHP_BIN=`command -v php`
  24. else
  25. PHP_BIN=php
  26. fi
  27. # find zf.php: pear first, same directory 2nd,
  28. if test "@php_dir@" != '@'php_dir'@'; then
  29. PHP_DIR="@php_dir@"
  30. else
  31. SELF_LINK="$0"
  32. SELF_LINK_TMP="$(readlink "$SELF_LINK")"
  33. while test -n "$SELF_LINK_TMP"; do
  34. SELF_LINK="$SELF_LINK_TMP"
  35. SELF_LINK_TMP="$(readlink "$SELF_LINK")"
  36. done
  37. PHP_DIR="$(dirname "$SELF_LINK")"
  38. fi
  39. "$PHP_BIN" -d safe_mode=Off -f "$PHP_DIR/zf.php" -- "$@"