about summary refs log tree commit homepage
path: root/examples
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-18 07:54:25 +0000
committerEric Wong <e@80x24.org>2019-10-18 07:55:14 +0000
commitb107d856d100317f1d9a5e13ebdf02af01a750f8 (patch)
tree93b182fedc518f9522129748d7c916ece2641c75 /examples
parent6b712fd2ee2d484de02150936d2a37e1bad9f61e (diff)
downloadpublic-inbox-b107d856d100317f1d9a5e13ebdf02af01a750f8.tar.gz
We need to account for both the old ("mainrepo") and new
("inboxdir") names.  But "dir" was just a search+replace
error and we don't use that outside of "coderepo.dir".
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/grok-pull.post_update_hook.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/grok-pull.post_update_hook.sh b/examples/grok-pull.post_update_hook.sh
index ab4e54e7..d003448e 100755
--- a/examples/grok-pull.post_update_hook.sh
+++ b/examples/grok-pull.post_update_hook.sh
@@ -26,7 +26,13 @@ else
 fi
 
 # run public-inbox-init iff unconfigured
-cfg_dir=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".dir)
+cfg_dir=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".inboxdir)
+
+# check legacy name for "inboxdir"
+case $cfg_dir in
+'') cfg_dir=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".mainrepo) ;;
+esac
+
 case $cfg_dir in
 '')
         remote_git_url=$(git --git-dir="$full_git_dir" config remote.origin.url)