From 5ccbabd36ca9072b008f0ae444982de57ce6eb19 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 12 Oct 2017 15:45:43 +1300 Subject: [PATCH] BUG Fix sake path lookup to find vendor framework Remove legacy sapphire lookup --- sake | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sake b/sake index ac0dafdec..31a9ef84a 100755 --- a/sake +++ b/sake @@ -24,12 +24,12 @@ else directory="$PWD" base=. for (( n=${#slashes}; n>0; --n )) do - if [ -d "$directory/framework" ]; then - framework="$directory/framework" + if [ -d "$directory/vendor/silverstripe/framework" ]; then + framework="$directory/vendor/silverstripe/framework" break - elif [ -d "$directory/sapphire" ]; then - framework="$directory/sapphire" + elif [ -d "$directory/framework" ]; then + framework="$directory/framework" break fi @@ -74,20 +74,20 @@ if [ "$1" = "-start" ]; then echo "You need to install the 'daemon' tool. In debian, go 'sudo apt-get install daemon'" exit 1 fi - + if [ ! -f $base/$2.pid ]; then echo "Starting service $2 $3" touch $base/$2.pid pidfile=`realpath $base/$2.pid` - + outlog=$base/$2.log errlog=$base/$2.err echo "Logging to $outlog" - + sake=`realpath $0` base=`realpath $base` - + # if third argument is not explicitly given, copy from second argument if [ "$3" = "" ]; then url=$2 @@ -95,7 +95,7 @@ if [ "$1" = "-start" ]; then url=$3 fi - # TODO: Give a globally unique processname by including the projectname as well + # TODO: Give a globally unique processname by including the projectname as well processname=$2 daemon -n $processname -r -D $base --pidfile=$pidfile --stdout=$outlog --stderr=$errlog $sake $url @@ -109,7 +109,7 @@ if [ "$1" = "-stop" ]; then pidfile=$base/$2.pid if [ -f $pidfile ]; then echo "Stopping service $2" - + # TODO: This is a bad way of killing the process kill -KILL `cat $pidfile` unlink $pidfile