#!/bin/sh

# Used by scripts/Makefile and scripts/rebar-pre-script to generate
# the yaws execution script

set -e

topdir=`cd .. && pwd`
cat yaws.template | \
    ./Subst %yawsdir% "${topdir}" | \
    ./Subst %vardir% "${VARDIR}" | \
    ./Subst %run_erl% "${ERLBINDIR}/run_erl" | \
    ./Subst %to_erl% "${ERLBINDIR}/to_erl" | \
    ./Subst %erl% "${ERL}" | \
    ./Subst %werl% "${WERL}"

exit 0
