Skip to content
This repository
Newer
Older
100644 66 lines (54 sloc) 1.727 kb
e315955c »
2002-03-04 ""
1 #!/bin/sh
2
3
4 prefix=$1
3a3459ca »
2003-05-04 ""
5 installprefix=$2
6 erl=$3
7 etcdir=$4
e315955c »
2002-03-04 ""
8
9 . ../vsn.mk
8104bc6c »
2002-03-04 ""
10 y=yaws-${YAWS_VSN}
3a3459ca »
2003-05-04 ""
11 p=${prefix}
e315955c »
2002-03-04 ""
12
fdfd9e3a »
2003-05-26 cvs fixes + install scripts gentoo/suse/redhat
13
14 # sed mangler
15 mangle ()
16 {
17 d=$1
18 e=$2
19 from=$3
20 to=$4
21
22 install -d `dirname $to`
23 sed -e "s;%yawsdir%;$d;g" -e "s;%erl%;$e;" $from > $to
24 }
25
26
27
28 mangle ${prefix}/lib/yaws ${erl} yaws.ss ${installprefix}/bin/yaws
3a3459ca »
2003-05-04 ""
29 install -d ${installprefix}/lib/yaws/examples/ebin
30 install -d ${installprefix}/lib/yaws/examples/include
31 chmod +x ${installprefix}/bin/yaws
deddbfc8 » Mikael Karlsson
2003-04-10 Build chain modifications: Install target directories is now totally …
32 if [ -f ${etcdir}/yaws.conf ]; then
33 t=${etcdir}/yaws.conf.template
e315955c »
2002-03-04 ""
34 else
deddbfc8 » Mikael Karlsson
2003-04-10 Build chain modifications: Install target directories is now totally …
35 t=${etcdir}/yaws.conf
e315955c »
2002-03-04 ""
36 fi
37
fdfd9e3a »
2003-05-26 cvs fixes + install scripts gentoo/suse/redhat
38 mangle ${prefix}/lib/yaws ${erl} yaws.conf.template ${t}
e41d79b4 »
2003-05-04 ""
39
40
90111837 »
2003-05-04 ""
41 if [ -f /etc/gentoo-release ]; then
29d98829 »
2003-05-04 ""
42 install -d ${etcdir}/init.d/
43 install -d ${etcdir}/conf.d/
90111837 »
2003-05-04 ""
44 cp gentoo/init.d.yaws ${etcdir}/init.d/yaws
e06b1b51 »
2003-05-04 ""
45 chmod +x ${etcdir}/init.d/yaws
3a3459ca »
2003-05-04 ""
46 sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${etcdir}/conf.d/yaws
90111837 »
2003-05-04 ""
47 elif [ -f /etc/redhat-release ]; then
48 install -d ${etcdir}/init.d
fdfd9e3a »
2003-05-26 cvs fixes + install scripts gentoo/suse/redhat
49 sed -e "s;%prefix%;$p;g" redhat/yaws.init.d > ${etcdir}/init.d/yaws
50 chmod +x ${etcdir}/init.d/yaws
51 elif [ -f /etc/suseservers ]; then
52 install -d ${etcdir}/init.d
53 sed -e "s;%prefix%;$p;g" suse/yaws.init.d > ${etcdir}/init.d/yaws
90111837 »
2003-05-04 ""
54 chmod +x ${etcdir}/init.d/yaws
6e7055a0 »
2003-08-19 Darwin /etc scripts support supplied by Eric Baur
55 elif [ "`uname -s`" = "Darwin" ]; then
56 startupdir="/Library/StartupItems/Yaws"
57 if [ ! -d ${startupdir} ]; then
58 mkdir ${startupdir};
59 fi
60 sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
61 chmod +x ${startupdir}/Yaws
62 cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
90111837 »
2003-05-04 ""
63 else
64 echo "Don't know how to make /etc/init scrips for this system"
fdfd9e3a »
2003-05-26 cvs fixes + install scripts gentoo/suse/redhat
65 echo "possibly add $1/bin/yaws -D -heart to your /etc/rc.local manually"
63772226 »
2002-06-16 ""
66 fi
e315955c »
2002-03-04 ""
67
e41d79b4 »
2003-05-04 ""
68
90111837 »
2003-05-04 ""
69
70
Something went wrong with that request. Please try again.