about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-04-06 09:56:21 +0000
committerEric Wong <e@yhbt.net>2020-04-06 18:49:59 +0000
commitecb21bea58c0a0cb2a4abb399339d197f8076e56 (patch)
treeff4255f96ad01c43967a157ea037f5ef803a1e14
parent92f2b503dacaaa320675ddee89584876c369850b (diff)
downloadpublic-inbox-ecb21bea58c0a0cb2a4abb399339d197f8076e56.tar.gz
Users are encouraged to edit this script, anyways, so make it
easy for them to swap out and use whatever URL they need.
-rwxr-xr-xexamples/grok-pull.post_update_hook.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/grok-pull.post_update_hook.sh b/examples/grok-pull.post_update_hook.sh
index 18200ba2..3ead3944 100755
--- a/examples/grok-pull.post_update_hook.sh
+++ b/examples/grok-pull.post_update_hook.sh
@@ -3,6 +3,8 @@
 # git repo path as it's first and only arg.
 full_git_dir="$1"
 
+url_base=http://127.0.0.1:8080/
+
 # same default as other public-inbox-* tools
 PI_CONFIG=${PI_CONFIG-~/.public-inbox/config}
 
@@ -79,7 +81,7 @@ case $cfg_dir in
                 echo >&2 "E: curl $config_url failed"
                 echo >&2 "E: using bogus <$addresses> for $inbox_dir"
         fi
-        local_url="http://127.0.0.1:8080/$inbox_name"
+        local_url="$url_base$inbox_name"
         public-inbox-init -V$inbox_fmt "$inbox_name" \
                 "$inbox_dir" "$local_url" $addresses