From ad454baebd8f09eb8a8b920b6e0c7a033df684e7 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Sat, 1 Jan 2022 11:27:17 +0000 Subject: [PATCH] Script to update web page Help files --- CHECKLIST.md | 8 +++++++- scripts/web-help.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100755 scripts/web-help.sh diff --git a/CHECKLIST.md b/CHECKLIST.md index 149e3d75..ab7cb4c2 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -56,7 +56,13 @@ make update-po * Upload AppImage to web AppImages location * Edit `/AppImage/appimages.txt` to include latest AppImage at the *top* of the list -* Copy Help html files to `/help` +* Update the web-page Help files if they have changed + * commit and push if necessary + +```sh +./scripts/web-help.sh +``` + * Copy `geeqie.desktop` to `/` * Copy `org.geeqie.Geeqie.appdata.xml` to `/` * Push changes to `geeqie.github.io` diff --git a/scripts/web-help.sh b/scripts/web-help.sh new file mode 100755 index 00000000..4a9fb1e0 --- /dev/null +++ b/scripts/web-help.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +## @file +## @brief Update the Geeqie webpage Help files +## +## It assumes that the main geeqie project folder and the +## geeqie.github.io folder are at the same level. +## +## e.g. +## @code +## / +## | +## somewhere +## | +## _______________ +## | | +## geeqie geeqie.github.io +## @endcode +## +## Files in ./doc/html are regenerated and copied to the webpage folder. +## +## After the script has run, git diff will show any changes that +## require a git commit and git push to be made. +## + +if [ ! -d ".git" ] || [ ! -d "src" ] || [ ! -f "geeqie.1" ] +then + echo "This is not a Geeqie project folder" + exit 1 +fi + +if [ ! -d "../geeqie.github.io/.git" ] || [ ! -d "../geeqie.github.io/help" ] +then + echo "The Geeqie webpage project folder geeqie.github.io was not found" + exit 1 +fi + +rm -rf doc/html +tmpdir=$(mktemp --tmpdir --directory) + +make -j install DESTDIR="$tmpdir" +rm -r "$tmpdir" + +find ../geeqie.github.io/help/ -type f -exec rm "{}" \; +cp -a doc/html/* ../geeqie.github.io/help + +exit 0 -- 2.20.1