This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
/
makecat.redhat
89 lines (81 loc) · 1.8 KB
/
makecat.redhat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/sh
HOST=`hostname`
if test -n "$RPM_BUILD_ROOT"
then
VENDROOT=/usr/local/minivend
BASEDIR=/var/lib/minivend
RELOCATE="relocate=$RPM_BUILD_ROOT"
HOST=RPM_CHANGE_HOST
elif test -d /usr/local/minivend -a -w /usr/local/minivend
then
VENDROOT=/usr/local/minivend
BASEDIR=/var/lib/minivend
elif test -d /usr/local/minivend -a -w /usr/local/minivend
then
VENDROOT=$HOME/mvend
else
echo "Can't find minivend directory."
exit 1
fi
if test -d /home/httpd/html -a -w /home/httpd/html
then
DOCROOT=/home/httpd/html
CGIDIR=/home/httpd/cgi-bin
SERVERCONF=/etc/httpd/conf/httpd.conf
CGIBASE=/cgi-bin
elif test -d /usr/local/apache/htdocs -a -w /usr/local/apache/htdocs
then
DOCROOT=/usr/local/apache/htdocs
CGIDIR=/usr/local/apache/cgi-bin
SERVERCONF=/usr/local/apache/conf/httpd.conf
CGIBASE=/cgi-bin
else
echo "Can't find HTTP root."
exit 1
fi
FOUND=1
for i in /usr/sbin/sendmail /usr/lib/sendmail
do
if test -x $i
then
FOUND=0
break
fi
done
if test $FOUND = 1
then
echo "No sendmail program found. Cannot continue."
exit 1
fi
if test -z "$1"
then
set simple basic
fi
for i in $*
do
mkdir -p $RPM_BUILD_ROOT$CGIDIR 2>/dev/null
mkdir -p $RPM_BUILD_ROOT$BASEDIR/$i 2>/dev/null
bin/makecat \
-F \
--cgibase=$CGIBASE \
--basedir=$BASEDIR \
--documentroot=$DOCROOT \
--minivenduser=minivend \
--minivendgroup=minivend \
--serverconf=$SERVERCONF \
--vendroot=$VENDROOT \
--catroot=$BASEDIR/$i \
--cgidir=$CGIDIR \
$RELOCATE \
--servername=$HOST \
--cgiurl=$CGIBASE/$i \
--demotype=$i \
--mailorderto=minivend@$HOST \
--catuser=minivend \
--permtype=user \
--samplehtml=$DOCROOT/$i \
--imagedir=$DOCROOT/$i/images \
--imageurl=/$i/images \
--linkmode=UNIX \
--sampleurl=http://$HOST/$i --catalogname=$i
done