-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_proftpd_faq
61 lines (56 loc) · 1.16 KB
/
build_proftpd_faq
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
#!/bin/bash
#
# Proftpd
# I'm now symlinking the docbook source to faq.sgml
#
export BASE="$HOME/Proftpd/"
export ROOT="$BASE/www.pdd/"
export FTP="$BASE/ftp.pdd/proftpd/"
export FAQ="faq"
export SGMLSRC="$BASE/FAQ/$FAQ.sgml"
##
## Test to see if we can find a stylesheet using a
## provided path
##
if [ -f $DSSSL_STYLESHEET_PATH/html/docbook.dsl ]
then
DSL="$DSSSL_STYLESHEET_PATH/html/docbook.dsl"
else
# Fall back to a hardcoded default
DSL="/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl"
fi
##
##
##
mkdir -p $BASE/FAQ/html/
if [ -d $BASE/FAQ/html/ ]
then
cd $BASE/FAQ/html/
rm -rfv *
else
echo "Problem with html output directory"
exit
fi
# Build the single file
echo -n "Building FAQ: "
echo -n "single "
jade -t sgml -V nochunks -d $DSL ${SGMLSRC} > ${FAQ}_full.html
# Build the linked file
echo -n "linked "
mkdir linked
cd linked
jade -t sgml -d $DSL ${SGMLSRC}
cd ..
# PDF file
echo -n "pdf "
htmldoc --webpage -f ${FAQ}.pdf ${FAQ}_full.html
# Postscript
echo -n "ps "
htmldoc --webpage -f ${FAQ}.ps ${FAQ}_full.html
## Install
cd $BASE/FAQ/html
mkdir -p $BASE/www.proftpd.org/docs/faq
rsync -av . $BASE/www.proftpd.org/docs/faq
#
# End...
#