git_infra

Git infra scripts for git.bracken.jp
git clone https://git.bracken.jp/git_infra.git
Log | Files | Refs | LICENSE

commit 77f561f96bedc40e6d96305c0ec66fb953148b7f
parent 98ca2d579beacf37938e1ada3895480c971de04d
Author: Chris Bracken <chris@bracken.jp>
Date:   Mon, 18 May 2026 17:54:23 +0900

Eliminate defaulting for repos_root and web_root

Always use GRM_REPOS_ROOT and GOUT_WEB_ROOT directly. Fewer variations
to test.

Diffstat:
Mgrm | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/grm b/grm @@ -14,10 +14,10 @@ # | config | # # +----------+ # -# root directory of git repositories +# root directory of git repositories. GRM_REPOS_ROOT="/home/git" -# default owner +# default owner. GRM_OWNER="Chris Bracken" # default url prefix (without ending slash) @@ -26,11 +26,11 @@ GRM_URL_PREFIX="https://git.bracken.jp" # Add Mastodon verification URL to index header. ME_URL="https://famichiki.jp/@akande" -# path of the post-receive hooks for gout +# path of the post-receive hooks for gout. GRM_POSTRECV_HOOK="/home/git/git_infra/post-receive" GRM_POSTRECV_HOOKS_DIR="/home/git/git_infra/post-receive.d" -# root directory of gout web pages +# root directory of output gout web pages. GOUT_WEB_ROOT="/usr/local/www/git.bracken.jp" # # @@ -41,8 +41,8 @@ GOUT_WEB_ROOT="/usr/local/www/git.bracken.jp" export LC_CTYPE="en_US.UTF-8" prog_name="${0##*/}" -repos_root=${GRM_REPOS_ROOT:-/home/git} -web_root=${GOUT_WEB_ROOT:-/srv/git} +repos_root="$GRM_REPOS_ROOT" +web_root="$GOUT_WEB_ROOT" recompile_repo() { repo_dir="${repos_root}/${1}.git" @@ -57,7 +57,7 @@ recompile_repo() { cd "${repo_web_dir:?}" && \ rm -f "$cachefile" && \ rm -rf "commit" "file" && \ - gout -c "$cachefile" "$repo_dir" && \ + gout -c "$cachefile" "$repo_dir" && \ ln -sf log.html index.html && \ ln -sf ../logo.png logo.png && \ ln -sf ../style.css style.css && \