~urs-rau-k/openlp/packaging_add-windows-ver-no

« back to all changes in this revision

Viewing changes to scripts/build_docs.sh

  • Committer: Raoul Snyman
  • Date: 2015-06-09 19:47:48 UTC
  • mfrom: (16.2.1 openlp-packaging)
  • Revision ID: raoul@snyman.info-20150609194748-f19ds2e24jqy9rkd
Add the build scripts from the server into the packaging repo

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
DOCSTYPE=$1
 
4
OLD_PATH=$PATH
 
5
PATH=/usr/local/bin:$PATH
 
6
 
 
7
if [[ "$DOCSTYPE" == "api" ]]; then
 
8
    DOCSTITLE="API"
 
9
    DOCSDIR="api"
 
10
    TARBALL="docs"
 
11
else
 
12
    if [[ "$DOCSTYPE" == "manual" ]]; then
 
13
        DOCSTITLE="Manual"
 
14
        DOCSDIR="manual"
 
15
        TARBALL="manual"
 
16
    else
 
17
        DOCSTITLE="User Guide"
 
18
        DOCSDIR="user-guide"
 
19
        TARBALL="user-guide"
 
20
    fi
 
21
fi
 
22
 
 
23
echo "Building $DOCSTITLE documentation..."
 
24
cd /home/openlp/Projects/documentation/trunk
 
25
bzr up
 
26
cd $DOCSDIR
 
27
echo $DOCSDIR
 
28
pwd
 
29
rm -fR build
 
30
make html
 
31
echo "Creating tarball..."
 
32
cd build
 
33
cp -R html $TARBALL
 
34
tar -czvf ${TARBALL}.tar.gz $TARBALL
 
35
echo "Uploading tarball..."
 
36
scp ${TARBALL}.tar.gz openlp@openlp.org:public_html/
 
37
ssh openlp@openlp.org "cd ~/public_html && tar -xzvf ${TARBALL}.tar.gz"
 
38
echo "Finished $DOCSTITLE run."
 
39
PATH=$OLD_PATH