forked from linuxtraining/lt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-lt
executable file
·78 lines (61 loc) · 1.72 KB
/
build-lt
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
#!/bin/sh
# Nightly build script.
# This script generates all the books for the download page on the website.
# (c) 2010 Serge van Ginderachter
# This script is to be linked as git update hook, in the book repository
# (not in the build submodule!)
# then just do a nightly git pull in $GIT_DIR from CRON
if [ -z "$GIT_DIR" ]
then echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 " >&2
exit 1
fi
# We work on a checkout of the repository. So it's not a bare repository.
cd $GIT_DIR/../
# environment
wwwbooksdir=
outputdir=
www=
MAKEOPTS=
V=
. $GIT_DIR/../build-lt.conf || exit 1
if [ -z "$wwwbooksdir" -o -z "$outputdir" -o -z "$www" ]
then echo "Please configure lt-build.conf accordingly." >&2
exit 1
fi
# fresh start function
clean () {
./make.sh $MAKEOPTS clean
rm -rf $outputdir
}
clean
## Let's start
mkdir $V -p $www
# LinuxFun
./make.sh $MAKEOPTS html fundamentals
mkdir $V -p $www/html/
rsync -a $V $outputdir/html/ $www/html/fun/ --delete
./make.sh $MAKEOPTS build fundamentals
./make.sh $MAKEOPTS clean
mv $V $outputdir/*.pdf $www/LinuxFun.pdf
# LinuxAdm
./make.sh $MAKEOPTS build sysadmin
./make.sh $MAKEOPTS clean
mv $V $outputdir/*.pdf $www/LinuxAdm.pdf
# LinuxSrv
./make.sh $MAKEOPTS build advanced
./make.sh $MAKEOPTS clean
mv $V $outputdir/*.pdf $www/LinuxSrv.pdf
# LinuxTraining
./make.sh $MAKEOPTS build complete
./make.sh $MAKEOPTS clean
mv $V $outputdir/*.pdf $www/LinuxTraining.pdf
# Netwerken
./make.sh $MAKEOPTS build minibook_netwerken
./make.sh $MAKEOPTS clean
mv $V $outputdir/*.pdf $www/Netwerken.pdf
# cleanup
clean
rsync $V -a $www/ $wwwbooksdir/ --delete || exit 1
exit 0