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 <jan@janware.com>
This commit is contained in:
parent
9636f1064d
commit
f3f0ef10ca
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ set_global_variables()
|
||||||
# If we're in a toplevel directory, suppose projects_dir == project_dirs,
|
# If we're in a toplevel directory, suppose projects_dir == project_dirs,
|
||||||
# i.e. we only want to target this Git repo
|
# i.e. we only want to target this Git repo
|
||||||
if [ ! -d .git ]; then
|
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" = / ] && fatal "Failed to find projects directory"
|
||||||
projects_dir=`dirname $projects_dir`
|
projects_dir=`dirname $projects_dir`
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue