Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (54 sloc) 1.727 kB
e315955 @klacke ""
authored
1 #!/bin/sh
2
3
4 prefix=$1
3a3459c @klacke ""
authored
5 installprefix=$2
6 erl=$3
7 etcdir=$4
e315955 @klacke ""
authored
8
9 . ../vsn.mk
8104bc6 @klacke ""
authored
10 y=yaws-${YAWS_VSN}
3a3459c @klacke ""
authored
11 p=${prefix}
e315955 @klacke ""
authored
12
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
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
3a3459c @klacke ""
authored
29 install -d ${installprefix}/lib/yaws/examples/ebin
30 install -d ${installprefix}/lib/yaws/examples/include
31 chmod +x ${installprefix}/bin/yaws
deddbfc Build chain modifications: Install target directories is now totally …
Mikael Karlsson authored
32 if [ -f ${etcdir}/yaws.conf ]; then
33 t=${etcdir}/yaws.conf.template
e315955 @klacke ""
authored
34 else
deddbfc Build chain modifications: Install target directories is now totally …
Mikael Karlsson authored
35 t=${etcdir}/yaws.conf
e315955 @klacke ""
authored
36 fi
37
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
38 mangle ${prefix}/lib/yaws ${erl} yaws.conf.template ${t}
e41d79b @klacke ""
authored
39
40
9011183 @klacke ""
authored
41 if [ -f /etc/gentoo-release ]; then
29d9882 @klacke ""
authored
42 install -d ${etcdir}/init.d/
43 install -d ${etcdir}/conf.d/
9011183 @klacke ""
authored
44 cp gentoo/init.d.yaws ${etcdir}/init.d/yaws
e06b1b5 @klacke ""
authored
45 chmod +x ${etcdir}/init.d/yaws
3a3459c @klacke ""
authored
46 sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${etcdir}/conf.d/yaws
9011183 @klacke ""
authored
47 elif [ -f /etc/redhat-release ]; then
48 install -d ${etcdir}/init.d
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
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
9011183 @klacke ""
authored
54 chmod +x ${etcdir}/init.d/yaws
6e7055a @klacke Darwin /etc scripts support supplied by Eric Baur
authored
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
9011183 @klacke ""
authored
63 else
64 echo "Don't know how to make /etc/init scrips for this system"
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
65 echo "possibly add $1/bin/yaws -D -heart to your /etc/rc.local manually"
6377222 @klacke ""
authored
66 fi
e315955 @klacke ""
authored
67
e41d79b @klacke ""
authored
68
9011183 @klacke ""
authored
69
70
Something went wrong with that request. Please try again.