From 41dfc9a45b29e0d81148a8a97e653b292fc856c9 Mon Sep 17 00:00:00 2001 From: LaroTayoGaming Date: Fri, 11 Dec 2020 13:41:42 +0800 Subject: [PATCH] readding dev.sh --- dev.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 dev.sh diff --git a/dev.sh b/dev.sh new file mode 100755 index 00000000..d6a3e4f0 --- /dev/null +++ b/dev.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +PHPBIN=php7.3 + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if [ ! -e "data/config.php" ]; then + cp "$DIR/data/config.php.example" "$DIR/data/config.php" +fi + +if ! which $PHPBIN 2>/dev/null; then + PHPBIN=php +fi + +# Installing git hook +$DIR/hooks/install.sh + +$PHPBIN composer.phar install +git submodule update --init +git submodule update --recursive --remote +$PHPBIN --server 0.0.0.0:8000 --docroot "$DIR/web" "$DIR/web/index.php"