GTK2 no longer supported
[geeqie.git] / scripts / web-help.sh
1 #!/bin/sh
2
3 ## @file
4 ## @brief Update the Geeqie webpage Help files
5 ##
6 ## It assumes that the main geeqie project folder and the
7 ## <em>geeqie.github.io</em> folder are at the same level.
8 ##
9 ## e.g.
10 ## @code
11 ##            /
12 ##            |
13 ##        somewhere
14 ##            |
15 ##     _______________
16 ##     |             |
17 ##   geeqie    geeqie.github.io
18 ## @endcode
19 ##
20 ## Files in <em>./doc/html</em> are regenerated and copied to the webpage folder.
21 ##
22 ## After the script has run, <em>git diff</em> will show any changes that
23 ## require a <em>git commit</em> and <em>git push</em> to be made.
24 ##
25
26 if [ ! -d ".git" ] || [ ! -d "src" ] || [ ! -f "geeqie.1" ]
27 then
28         printf '%s\n' "This is not a Geeqie project folder"
29         exit 1
30 fi
31
32 if [ ! -d "../geeqie.github.io/.git" ] || [ ! -d "../geeqie.github.io/help" ]
33 then
34         printf '%s\n' "The Geeqie webpage project folder geeqie.github.io was not found"
35         exit 1
36 fi
37
38 ninja -C build
39
40 find ../geeqie.github.io/help/ -type f -exec rm "{}" \;
41 cp -a build/doc/html/* ../geeqie.github.io/help
42
43 exit 0