]> Shamusworld >> Repos - ardour-manual-diverged/blob - doit
More work on the Editor's lists and status bar
[ardour-manual-diverged] / doit
1 #!/bin/sh
2 #
3 # Simple shell script to do all the steps that need doing
4 #
5
6 # if a parameter exists, that's where the website is copied after generation
7 if [ -n "$1" ]
8 then
9   DIRHTML=$(echo "$1"|sed 's/\/$//g'); #strips the trailing slash if need be
10 else
11   DIRHTML="";
12 fi
13
14 # create the required folders if need be, or empties them
15 if [ ! -d "_site" ]; then
16   mkdir _site
17 else
18         rm -rf _site/*
19 fi
20
21 if [ ! -d "_manual" ]; then
22   mkdir _manual
23 else
24   rm -rf _manual/*
25 fi
26
27 rm -rf _build/* && \
28 ./munge && \
29 ruby2.2 ./build.rb 
30 chmod -R a+rx _site
31
32 # if a target directory exists, copy the site there
33 if [ ! -z "$DIRHTML" ]
34 then
35   rm -rf "$DIRHTML/*"
36   cp -R _site/* "$DIRHTML/"
37 fi
38
39