Skip to content

Commit

Permalink
Merge pull request phalcon#7 from racklin/zephir-bin
Browse files Browse the repository at this point in the history
Set ZEPHIRDIR to zephir shell script's parent directory if ZEPHIRDIR ENV variable is not set.
  • Loading branch information
andresgutierrez committed Sep 30, 2013
2 parents 5f5b656 + 58a8eb6 commit 078cf6d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/zephir
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
CURDIR=`dirname $0`
PARENTDIR=`dirname $CURDIR`
if [ -z "$ZEPHIRDIR" ]; then
echo "Environment variable ZEPHIRDIR is not set"
exit 1
if [ -f $PARENTDIR/compiler.php ]; then
export ZEPHIRDIR=$PARENTDIR
else
echo "Environment variable ZEPHIRDIR is not set"
exit 1
fi
fi
php $ZEPHIRDIR/compiler.php $*

0 comments on commit 078cf6d

Please sign in to comment.