ref: bbb8fcc783f83efa6c3bf4c35f7353a085f4fb5c mousikofidi/build.sh -rwxr-xr-x 1.0 KiB View raw
                                                                                
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
#!/bin/bash

set -x
set -e

this_dir=$(realpath $(dirname ${0}))

cd "${this_dir}"

# Grab files from other branches
test -z $FIDI_SITE_NOFETCH || git fetch origin wiki
git checkout origin/wiki -- config.md devel.md setup.md user_guide.md
test -z $FIDI_SITE_NOFETCH || git fetch origin master
git checkout origin/master -- mousikofidi/static/css/fidi.css

# Move them to where we need them
mv -v mousikofidi/static/css/fidi.css site/css/
mv -v config.md devel.md setup.md user_guide.md site/

# Remove them from vcs
git rm config.md devel.md setup.md user_guide.md mousikofidi/static/css/fidi.css

# Inject headings
cd site

echo -e "# Configuration Guide\n" | cat - config.md > _config.md
mv -fv _config.md config.md

echo -e "# Developer's Guide\n" | cat - devel.md > _devel.md
mv -fv _devel.md devel.md

echo -e "# Installation & Setup\n" | cat - setup.md > _setup.md
mv -fv _setup.md setup.md

echo -e "# User's Guide\n" | cat - user_guide.md > _user_guide.md
mv -fv _user_guide.md user_guide.md

cd ..

# Build!
soupault --verbose