From 69d6b1b5651b271acb517ed9e5b94b1eeebe0e63 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 27 Aug 2024 12:46:13 +0200 Subject: [PATCH] Emacsg: Allow this repository itself to be a submodule Closes #30. Closes emacscollective/borg#154. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ac8caa4..e3cc47a 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,10 @@ help helpall:: @printf "\n" bootstrap-borg: - @mkdir .git/modules - @git clone https://github.com/emacscollective/borg lib/borg \ - --separate-git-dir .git/modules/borg + @ GITDIR="$$(realpath --relative-to=. "$$(git rev-parse --git-dir)")"; \ + mkdir "$$GITDIR/modules"; \ + git clone https://github.com/emacscollective/borg lib/borg \ + --separate-git-dir "$$GITDIR/modules/borg" @cd lib/borg; git symbolic-ref HEAD refs/heads/main @cd lib/borg; git reset --hard HEAD