forked from sonatype/maven-example-en
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassemble.sh
executable file
·34 lines (25 loc) · 1.02 KB
/
assemble.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
#!/bin/bash
# fail if anything errors
set -e
# fail if a function call is missing an argument
set -u
rm -rf target/site/reference
rm -rf target/site/pdf
echo "Copying resources for site"
mkdir -p target/site/reference
mkdir -p target/site/pdf
# this relies on the example project being build prior to this and is achieved
# with a separate build step
cp examples/target/mvnexbook-examples-1.0-project.zip target/site/mvnex-examples.zip
cp -r target/book-mvnex.chunked/* target/site/reference
mkdir -p target/site/reference/css
cp -r site/css target/site/reference
cp -r site/js target/site/reference
cp -r site/assets target/site/reference
cp site/search.html target/site/reference
cp target/book-mvnex.pdf target/site/pdf/mvnex-pdf.pdf
echo "Applying website template"
python template.py
cp target/site/reference/index.html target/site/reference/public-book.html
echo "Copying to production server"
rsync -e ssh --delete -av target/site/ [email protected]:/var/www/domains/sonatype.com/www/shared/books/mvnex-book/