Commit ea53a552 authored by Roni Choudhury's avatar Roni Choudhury
Browse files

Added a driver script and an (empty) config file

The config file's plugins property will list whatever plugins are necessary for
the website.
parent 7ab9258e
#!/bin/sh
# Launches tangelo website on the supplied hostname and port.
#
# Omitting the hostname defaults it to "localhost", while omitting both defaults
# to "localhost:8080".
#
# Set the TANGELO environment variable to use a different Tangelo executable
# than the one on the path.
# Set TANGELO environment variable if unset.
if [ -z "${TANGELO}" ]; then
TANGELO=`command -v tangelo`
if [ -z "${TANGELO}" ]; then
echo "error: tangelo not found on path (set TANGELO, or add tangelo to path)" >/dev/stderr
exit 1
fi
fi
# Parse command line arguments.
hostname=$1
port=$2
if [ -z "${hostname}" ]; then
# If both are missing, they both receive the default values.
port=8080
hostname=localhost
elif [ -z "${port}" ]; then
# If the "port" argument is missing, then assume the "hostname" argument is
# actually the port.
port=${hostname}
hostname=localhost
fi
# Find the absolute path to this script.
here=`readlink -f $0`
here=`dirname "${here}"`
# Set the root location of the application
root="${here}/build/site"
# Launch the application
"${TANGELO}" --root "${root}" --host ${hostname} --port ${port} --config "${here}/tangelo-config.yaml"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment