From 472bba6fbbeabe45774045fcb71ed4af73d372d2 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 21 Feb 2026 12:04:26 +0100 Subject: [PATCH] pgit.sh: Make PGIT_SH_PROJECTS work on all commands PGIT_SH_PROJECTS currently only sets the projects to operate on for the get command. Extend this to all commands. And replace the environment variable by a command-line option, likely after this script has been ported to Python. Signed-off-by: Jan Lindemann --- scripts/pgit.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/pgit.sh b/scripts/pgit.sh index 8dcd4183..927d137f 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -60,7 +60,11 @@ set_global_variables() } [ "$project_dirs" ] || { - project_dirs=`(cd $projects_dir; ls -d */.git 2>/dev/null | sed 's%/.git%%')` + if [ "$PGIT_SH_PROJECTS" ]; then + project_dirs="$PGIT_SH_PROJECTS" + else + project_dirs=`(cd $projects_dir; ls -d */.git 2>/dev/null | sed 's%/.git%%')` + fi } n_projects=`echo $project_dirs | wc -w` }