-
Notifications
You must be signed in to change notification settings - Fork 60
/
createSite.sh
66 lines (41 loc) · 1.16 KB
/
createSite.sh
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
#!/usr/bin/env bash
function cp_site(){
f=$1
echo preparing $f
cp -ar ./$f/target/site ./target/site/$f
}
copyTo=$1
if [ X"$copyTo" = "X" ];
then
echo copy target is not specified.
exit 1
fi
mvn clean site javadoc:aggregate-jar
if [ $? -ne 0 ];
then
exit 1
fi
cp_site asta4d-core
cp_site asta4d-web
cp_site asta4d-spring
cp_site asta4d-sample
cp_site asta4d-doc
cp_site asta4d-archetype
cp_site asta4d-archetype-prototype
version=`cat currentVersion`
copyTo=$copyTo/$version
mkdir $copyTo
echo copying files to $copyTo
echo copying whole site
cp -ar ./target/site $copyTo
echo copying java doc
cp -ar ./target/apidocs $copyTo
echo copying user guide
cp -ar ./asta4d-doc/target/docbkx ./asta4d-doc/target/userguide
mv ./asta4d-doc/target/userguide/pdf/index.pdf ./asta4d-doc/target/userguide/pdf/userguide.$version.pdf
cp -ar ./asta4d-doc/target/userguide $copyTo
cp userguide_index.html $copyTo/userguide/index.html
sed -i "s/@version/$version/g" $copyTo/userguide/index.html
echo copying page_index
cp page_index.html $copyTo/index.html
sed -i "s/@version/$version/g" $copyTo/index.html