commit c6aa19c47f7fb194b12020b36806c0e1da719e1c
parent 681323e3f2306952089a05553cc84e4b74fa59ad
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 9 Apr 2026 14:11:09 +0200
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, 20 insertions(+), 0 deletions(-)
diff --git a/.git_wad.cfg b/.git_wad.cfg
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Copyright (C) 2021, 2022, 2026 |Meso|Star> (contact@meso-star.com)
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
+set -e
+
+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