[git] gnupg-doc - branch, master, updated. 3c8973d06cd0977c6c2710976773e07575c15952
by Werner Koch
cvs at cvs.gnupg.org
Sat Mar 18 14:34:19 CET 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".
The branch, master has been updated
via 3c8973d06cd0977c6c2710976773e07575c15952 (commit)
from 3d21081d17122deaf510e124cce71479dee8acf0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3c8973d06cd0977c6c2710976773e07575c15952
Author: Werner Koch <wk at gnupg.org>
Date: Sat Mar 18 14:31:23 2017 +0100
tools: Improve build-website.sh. Update mkkudos.sh.
diff --git a/tools/build-website.sh b/tools/build-website.sh
index 521ae46..dbe20ab 100755
--- a/tools/build-website.sh
+++ b/tools/build-website.sh
@@ -44,6 +44,8 @@ if [ ! -d "$HOME" ]; then
fi
reponame=gnupg-doc
+htdocs_web="/var/www/www/www.gnupg.org/htdocs"
+htdocs_blog="/var/www/www/www.gnupg.org/misc/blog"
workuser_dir=$HOME/${workuser}
log_dir="$HOME/log"
@@ -96,6 +98,10 @@ fi
trap "rm -f $LOCKFILE" 0
+# These flags are set to the stage directory iof a sync is required
+sync_web=
+sync_blog=
+
#
# Build main part
#
@@ -135,7 +141,7 @@ else
--eval "(org-publish \"gpgweb\" t nil)"
echo "$rev" > ${revlastfile}
-
+ sync_web=${stage_dir}/${subdir}
echo "$(date -u -Iseconds) build finished for $subdir" | tee -a ${buildlog}
fi
@@ -155,6 +161,7 @@ fi
revlast="$(head -1 ${revlastfile} 2>/dev/null || true)"
if [ x"$rev" = x"$revlast" ]; then
echo "$pgm: No need to build $subdir" >&2;
+ sync_blog=${stage_dir}/${subdir}
else
echo "$(date -u -Iseconds) build started for $subdir" | tee ${buildlog}
@@ -191,7 +198,7 @@ else
sudo -u webbuild-x ${indexcreator}
echo "$rev" > ${revlastfile}
-
+ sync_blog=${stage_dir}/${subdir}
echo "$(date -u -Iseconds) build finished for $subdir" | tee -a ${buildlog}
fi
@@ -201,14 +208,35 @@ fi
# Sync to the webspace
#
cd "${root_dir}"
+any_sync=
+
+if [ -n "$sync_web" ]; then
+ cd "$sync_web"
+ rsync -rlt --exclude '*~' --exclude '*.tmp' \
+ . ${htdocs_web}/
+ touch ${htdocs_web}/donate/donors.dat
+ any_sync=yes
+fi
+
+if [ -n "$sync_blog" ]; then
+ cd "$sync_blog"
+ rsync -vr --links --exclude '*~' --exclude '*.sh' \
+ --exclude '*tmp' --exclude '*.org' --exclude headlines.txt \
+ . ${htdocs_blog}/
+ any_sync=yes
+fi
+
+if [ "$any_sync" = yes ]; then
+ $HOME/bin/mkkudos.sh --verbose --force
+fi
#
# Print warnings when the scripts are out of date
# (For security reasons the scripts need to be installed manually.)
#
-for f in trigger-website-build build-website.sh ; do
- if cmp -s tools/$f ${HOME}/bin/$f ; then
+for f in trigger-website-build build-website.sh mkkudos.sh ; do
+ if ! cmp -s ${HOME}/bin/$f tools/$f ; then
echo "$pgm: Warning: A newer version of $f is available" >&2;
fi
done
diff --git a/tools/mkkudos.sh b/tools/mkkudos.sh
index 032958f..e2b7e92 100755
--- a/tools/mkkudos.sh
+++ b/tools/mkkudos.sh
@@ -27,6 +27,10 @@
set -e
+LD_LIBRARY_PATH=/usr/local/lib
+export LD_LIBRARY_PATH
+
+
usage()
{
cat <<EOF
@@ -36,7 +40,7 @@ Options:
--verbose Run in verbose mode
--test Run in test environment
EOF
- exit "$1"
+ exit $1
}
@@ -179,7 +183,7 @@ for file in "$htdocs/donate/"kudos-????.html "$htdocs/donate/"kudos.html \
fi
[ $verbose = yes ] && echo "processing $file" >&2
[ -f "$file.tmp" ] && rm "$file.tmp"
- awk -F: -v year="$year" -v donors="$donors" -v dontable="$dontable" \
+ awk -F: -v year=$year -v donors="$donors" -v dontable="$dontable" \
-v monyear="$monyear" -v thisyear="$thisyear" \
-v euro="$euro" -v euroyr="$euroyr" \
-v nyr="$nyr" -v goal="$goal" -v percent="$percent" \
-----------------------------------------------------------------------
Summary of changes:
tools/build-website.sh | 36 ++++++++++++++++++++++++++++++++----
tools/mkkudos.sh | 8 ++++++--
2 files changed, 38 insertions(+), 6 deletions(-)
hooks/post-receive
--
The GnuPG website and other docs
http://git.gnupg.org
More information about the Gnupg-commits
mailing list