From f3f0ef10ca908fbc8ce387218e2ba65de63657ff Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 24 Aug 2026 14:35:42 +0200 Subject: [PATCH] pgit.sh: Allow running under any projects-dir.mk There's a random string "some-random-string-to-id-this-makefile" in projects-dir-minimial.mk intended to check if the Makefile in the projects-directory is actually the final link target. It's re-used in pgit.sh to find the projects toplevel directory, but since it doesn't need to be an actual projects-dir-minimal.mk copy, another case should also be taken into consideration: Check if projects-dir.mk is included. Signed-off-by: Jan Lindemann --- scripts/pgit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pgit.sh b/scripts/pgit.sh index b7700ecb..aa2163ba 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -78,7 +78,7 @@ set_global_variables() # If we're in a toplevel directory, suppose projects_dir == project_dirs, # i.e. we only want to target this Git repo if [ ! -d .git ]; then - while [ ! -r Makefile ] || ! grep -q some-random-string-to-id-this-makefile Makefile; do + while [ ! -r Makefile ] || ! grep -q 'include $(JWBDIR)/make/projects-dir\.mk\|some-random-string-to-id-this-makefile' Makefile; do [ "$projects_dir" = / ] && fatal "Failed to find projects directory" projects_dir=`dirname $projects_dir` done