* [PATCH 2/3] examples/grok-pull.post_update_hook: capture infourl
2020-04-06 9:56 7% [PATCH 0/3] examples/grok-pull.post_update_hook updates Eric Wong
@ 2020-04-06 9:56 6% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-04-06 9:56 UTC (permalink / raw)
To: meta
The value of infourl parameters are shared in the config, so
include them in the mirror.
---
examples/grok-pull.post_update_hook.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/examples/grok-pull.post_update_hook.sh b/examples/grok-pull.post_update_hook.sh
index e04eb2c5..18200ba2 100755
--- a/examples/grok-pull.post_update_hook.sh
+++ b/examples/grok-pull.post_update_hook.sh
@@ -54,6 +54,7 @@ case $cfg_dir in
config_url="$remote_inbox_url"/_/text/config/raw
remote_config="$inbox_dir"/remote.config.$$
+ infourls=
trap 'rm -f "$remote_config"' EXIT
if curl --compressed -sSf -v "$config_url" >"$remote_config"
then
@@ -70,6 +71,8 @@ case $cfg_dir in
esac
newsgroups=$(git config -f "$remote_config" -l | \
sed -ne 's/^publicinbox\..\+\.newsgroup=//p')
+ infourls=$(git config -f "$remote_config" -l | \
+ sed -ne 's/^publicinbox\..\+.infourl=//p')
else
newsgroups=
addresses="$inbox_name@$$.$(hostname).example.com"
@@ -93,6 +96,11 @@ case $cfg_dir in
# only one newsgroup per inbox
break
done
+ for url in $infourls
+ do
+ git config -f "$PI_CONFIG" \
+ "publicinbox.$inbox_name.infourl" "$url"
+ done
curl -sSfv "remote_inbox_url"/description >"$inbox_dir"/description
echo "I: $inbox_name at $inbox_dir ($addresses) $local_url"
;;
^ permalink raw reply related [relevance 6%]
* [PATCH 0/3] examples/grok-pull.post_update_hook updates
@ 2020-04-06 9:56 7% Eric Wong
2020-04-06 9:56 6% ` [PATCH 2/3] examples/grok-pull.post_update_hook: capture infourl Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-06 9:56 UTC (permalink / raw)
To: meta
Some minor changes to make mirroring easier.
Eric Wong (3):
examples/grok-pull.post_update_hook: fetch mirror description
examples/grok-pull.post_update_hook: capture infourl
examples/grok-pull.post_update_hook: move url_base to the top
examples/grok-pull.post_update_hook.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
^ permalink raw reply [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-06 9:56 7% [PATCH 0/3] examples/grok-pull.post_update_hook updates Eric Wong
2020-04-06 9:56 6% ` [PATCH 2/3] examples/grok-pull.post_update_hook: capture infourl Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).