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 42 43 44
|
#!/bin/sh
## @file
## @brief Update the Geeqie webpage Help files
##
## It assumes that the main geeqie project folder and the
## <em>geeqie.github.io</em> folder are at the same level.
##
## e.g.
## @code
## /
## |
## somewhere
## |
## _______________
## | |
## geeqie geeqie.github.io
## @endcode
##
## Files in <em>./doc/html</em> are regenerated and copied to the webpage folder.
##
## After the script has run, <em>git diff</em> will show any changes that
## require a <em>git commit</em> and <em>git push</em> to be made.
##
if [ ! -d ".git" ] || [ ! -d "src" ] || [ ! -f "geeqie.1" ]
then
printf '%s\n' "This is not a Geeqie project folder"
exit 1
fi
if [ ! -d "../geeqie.github.io/.git" ] || [ ! -d "../geeqie.github.io/help" ]
then
printf '%s\n' "The Geeqie webpage project folder geeqie.github.io was not found"
exit 1
fi
ninja -C build
find ../geeqie.github.io/help/ -type f -exec rm "{}" \;
cp -a build/doc/html/* ../geeqie.github.io/help
cp -a build/doc/help.pdf ../geeqie.github.io/help-pdf
exit 0
|