Sake for SS3 and SS4

upgrade
Tags: #<Tag:0x00007f082c4d18c8>

#1

If you are keen to use sake for SS3 and SS4 then use this hack:

Edit your existing file: /usr/bin/sake

Original lines:

# Set $framework and $base
sakedir=`dirname $0`
if [ -f $sakedir/cli-script.php ]; then
        framework=$sakedir
        base=`dirname $sakedir`
elif [ -d ./framework ]; then
        framework=./framework
        base=.
elif [ -d ./sapphire ]; then
        framework=./sapphire
        base=.
elif [ -f ./cli-script.php ]; then
        framework=.
        base=..
else
        echo "Can't find ./framework/cli-script.php or ./cli-script.php"
        exit 1
fi

Are now:

# Set $framework and $base
sakedir=`dirname $0`
if [ -f $sakedir/cli-script.php ]; then
        framework=$sakedir
        base=`dirname $sakedir`
elif [ -d ./framework ]; then
        framework=./framework
        base=.

elif [ -d ./vendor/silverstripe/framework ]; then
        framework=./vendor/silverstripe/framework
        base=.

elif [ -d ./sapphire ]; then
        framework=./sapphire
        base=.
elif [ -f ./cli-script.php ]; then
        framework=.
        base=..
else
        echo "Can't find ./framework/cli-script.php or ./cli-script.php"
        exit 1
fi