Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

57 lines (43 sloc) 1.514 kB
#!/bin/sh
prefix=$1
installprefix=$2
erl=$3
werl=$4
etcdir=$5
vardir=$6
. ../vsn.mk
y=yaws-${YAWS_VSN}
p=${prefix}
cat yaws.template | \
./Subst %yawsdir% ${prefix}/lib/yaws | \
./Subst %erl% "${erl}" | \
./Subst %werl% "${werl}" > ${installprefix}/bin/yaws
chmod +x ${installprefix}/bin/yaws
install -d ${installprefix}/lib/yaws/examples/ebin
install -d ${installprefix}/lib/yaws/examples/include
if [ -f /etc/gentoo-release ]; then
install -d ${etcdir}/init.d/
install -d ${etcdir}/conf.d/
cp gentoo/init.d.yaws ${etcdir}/init.d/yaws
chmod +x ${etcdir}/init.d/yaws
sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${etcdir}/conf.d/yaws
elif [ -f /etc/redhat-release ]; then
install -d ${etcdir}/init.d
sed -e "s;%prefix%;$p;g" redhat/yaws.init.d > ${etcdir}/init.d/yaws
chmod +x ${etcdir}/init.d/yaws
elif [ -f /etc/suseservers ]; then
install -d ${etcdir}/init.d
sed -e "s;%prefix%;$p;g" suse/yaws.init.d > ${etcdir}/init.d/yaws
chmod +x ${etcdir}/init.d/yaws
elif [ "`uname -s`" = "Darwin" ]; then
startupdir="/Library/StartupItems/Yaws"
if [ ! -d ${startupdir} ]; then
mkdir ${startupdir};
fi
sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
chmod +x ${startupdir}/Yaws
cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
else
echo "Don't know how to make /etc/init scrips for this system"
echo "possibly add $1/bin/yaws -D -heart to your /etc/rc.local manually"
fi
Jump to Line
Something went wrong with that request. Please try again.