-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsf
More file actions
executable file
·27 lines (24 loc) · 836 Bytes
/
sf
File metadata and controls
executable file
·27 lines (24 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/bash
DIR="$(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
cd "$DIR"
if [ "$PHP_BINARY" == "" ]; then
if [ -f ./bin/php7/bin/php ]; then
PHP_BINARY="./bin/php7/bin/php"
elif [[ ! -z $(type php) ]]; then
PHP_BINARY=$(type -p php)
else
echo "Valid PHP 7 executable not found, please visit https://github.com/iTXTech/SimpleFramework"
exit 1
fi
fi
if [ "$SF_FILE" == "" ]; then
if [ -f ./SimpleFramework.phar ]; then
SF_FILE="./SimpleFramework.phar"
elif [ -f ./src/iTXTech/SimpleFramework/SimpleFramework.php ]; then
SF_FILE="./src/iTXTech/SimpleFramework/SimpleFramework.php"
else
echo "SimpleFramework executable not found, please visit https://github.com/iTXTech/SimpleFramework"
exit 1
fi
fi
exec "$PHP_BINARY" "$SF_FILE" $@