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