-
Notifications
You must be signed in to change notification settings - Fork 2
/
mk_doc.SX
44 lines (44 loc) · 853 Bytes
/
mk_doc.SX
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
# mk_doc.sx - Make the SamaruX printed manual
#
# Last edited: 30 Dec 2023
#
# Use: batch mk_doc.sx dest_file formfeed
# Ex.: batch mk_doc.sx manual.txt on
#
# We need the files mk_cover.txt and mk_ff.txt.
# If we add new topics to the manual,
# we need to modify the mk_chap???.sx batch file.
#
if $# eq 2 goto make
echo Error in # of args.
goto end
#
# make:
#
uname -r | read SXVERS
uname -v | read SXDATE
echo Making MANUAL for Vn. $SXVERS / $SXDATE
#
echo > nl.tmp
cp mk_ff.txt chapsep.tmp
cp mk_ff.txt sectsep.tmp
if $2 eq on goto make2
echo '=== oOo ===' > chsep.tmp
cat chsep.tmp nl.tmp > chapsep.tmp
echo > sectsep.tmp
#
# make2:
#
batch mk_cover.sx cover.tmp $SXVERS $SXDATE
env SXVERS
env SXDATE
batch mk_toc.sx
batch mk_chap1.sx
batch mk_chap2.sx
batch mk_chap3.sx
#
cat cover.tmp toc.tmp ch1.tmp ch2.tmp ch3.tmp > $1
#
rm -f *.tmp
#
# end: