diff -up bin/zephir.rpm bin/zephir --- bin/zephir.rpm 2017-10-11 16:28:17.271148783 +0200 +++ bin/zephir 2017-10-11 17:37:30.075485109 +0200 @@ -1,26 +1,8 @@ #!/bin/sh -if [ -z "$ZEPHIRDIR" ]; then - ZEPHIRDIR="%ZEPHIRDIR%" - if [ "$ZEPHIRDIR" = "%""ZEPHIRDIR""%" ]; then - if [ -h $0 ]; then - REALPATH="`dirname $0`/`readlink $0`" - CURDIR=`dirname $REALPATH` - else - CURDIR=`dirname $0` - fi - PARENTDIR=`cd $CURDIR/..; pwd` - - if [ -f $PARENTDIR/compiler.php ]; then - export ZEPHIRDIR=$PARENTDIR - else - echo "Environment variable ZEPHIRDIR is not set" - exit 1 - fi - fi -fi +export ZEPHIRDIR="@DATADIR@/zephir" if [ ! -z $1 ] && [ ! -z $2 ] && [ ! -z $3 ] && [ "$1" = "-c" ]; then - php -c $2 $ZEPHIRDIR/compiler.php ${*:3} + @BINDIR@/php -d memory_limit=1G -d extension=zephir_parser.so -c $2 $ZEPHIRDIR/compiler.php ${*:3} else - php $ZEPHIRDIR/compiler.php $* + @BINDIR@/php -d memory_limit=1G -d extension=zephir_parser.so $ZEPHIRDIR/compiler.php $* fi