forked from wa0x6e/Fresque
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfresque
executable file
·32 lines (28 loc) · 917 Bytes
/
fresque
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
28
29
30
31
32
#!/bin/bash
#
# Fresque
#
# PHP 5.3
# Redis 2
#
# Copyright (c) 2012, Wan Chen aka Kamisama <kami@kamisama.me>
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
#
# @copyright Copyright (c) 2012, Wan Chen aka Kamisama
# @link https://github.com/kamisama
# @package Fresque
# @version 0.1
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
# Resolve symlink path
# @link: http://stackoverflow.com/questions/7665/how-to-resolve-symbolic-links-in-a-shell-script/697552#697552
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
while [ -h $SELF_PATH ]; do
DIR=$(dirname -- "$SELF_PATH")
SYM=$(readlink $SELF_PATH)
SELF_PATH=$(cd $DIR && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
done
exec php7.3 -q ${SELF_PATH/%fresque/}lib/init.php "$@"
exit;