commit a23923b2cd1e30f1f3dc1ea7fac3c9ec8e9f0d86
parent d6d1bc03023d1fbcf59d09fc5b0390b89c092d4b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 14 Nov 2025 15:26:52 +0100
Add a .git_wad.cfg file.
This configures the default fetch URL for git-wad when the git
repository has been retrieved using the git protocol rather than HTTP or
SSH. Rsync cannot be used in this case. It is therefore assumed that a
Rsync daemon is running on the remote machine and serving the same
address to enable WAD files to be downloaded.
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/.git_wad.cfg b/.git_wad.cfg
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+fetch_url="$(git config remote.origin.url)"
+
+# If the fetch URL uses the git protocol, assume that a corresponding
+# Rsync URL is available for WAD files
+if echo "${fetch_url}" | grep -qe "^git://"; then
+ GIT_WAD_REMOTE_FETCH="$(echo "${fetch_url}" \
+ | sed -e 's#^git://#rsync://#' \
+ -e 's#/\([^/]\{1,\}\)$#/git/\1#')"
+fi