2021-05-08 10:02:41 +08:00
|
|
|
#!/bin/sh
|
2020-03-02 16:14:20 +08:00
|
|
|
|
2021-05-08 10:02:41 +08:00
|
|
|
if [ -f "$(pwd)/runtime/php" ]; then
|
|
|
|
|
executable="$(pwd)/runtime/php"
|
|
|
|
|
echo "* Framework started with built-in php."
|
|
|
|
|
else
|
|
|
|
|
which php >/dev/null 2>&1
|
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
|
executable=$(which php)
|
|
|
|
|
else
|
|
|
|
|
echo 'Cannot find any PHP runtime, please use command `./install-runtime.sh` or install PHP manually!'
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2021-01-18 18:08:29 +08:00
|
|
|
|
2021-05-08 10:02:41 +08:00
|
|
|
if [ -f "$(pwd)/src/entry.php" ]; then
|
|
|
|
|
$executable "$(pwd)/src/entry.php" $@
|
|
|
|
|
elif [ -f "$(pwd)/vendor/zhamao/framework/src/entry.php" ]; then
|
|
|
|
|
$executable "$(pwd)/vendor/zhamao/framework/src/entry.php" $@
|
|
|
|
|
else
|
|
|
|
|
echo "Cannot find zhamao-framework entry file!"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|