diff options
author | Eric Wong <e@80x24.org> | 2019-10-18 07:54:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-10-18 07:55:14 +0000 |
commit | b107d856d100317f1d9a5e13ebdf02af01a750f8 (patch) | |
tree | 93b182fedc518f9522129748d7c916ece2641c75 /examples | |
parent | 6b712fd2ee2d484de02150936d2a37e1bad9f61e (diff) | |
download | public-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-x | examples/grok-pull.post_update_hook.sh | 8 |
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) |