From 7d246609e32a60f041698cc56f892c13369a9589 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 25 Dec 2014 18:29:56 -0800 Subject: [PATCH] toolbox: anchor _repo pattern to start of line Although unlikely, it's possible that a user name could contain the pattern _repo thereby causing that repository to be skipped by the make-all-gc-eligible and update-all-hooks tools. Anchor the _repo pattern to the beginning of the line with ^ to avoid this possibility. --- toolbox/make-all-gc-eligible.sh | 2 +- toolbox/update-all-hooks.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolbox/make-all-gc-eligible.sh b/toolbox/make-all-gc-eligible.sh index 082f3cc..d392833 100755 --- a/toolbox/make-all-gc-eligible.sh +++ b/toolbox/make-all-gc-eligible.sh @@ -10,7 +10,7 @@ set -e umask 002 base="$cfg_reporoot" -cut -d : -f 1 < "$cfg_chroot/etc/group" | grep -v _repo | \ +cut -d : -f 1 < "$cfg_chroot/etc/group" | grep -v ^_repo | \ ( count=0 while read proj; do diff --git a/toolbox/update-all-hooks.sh b/toolbox/update-all-hooks.sh index 173b177..7b1c2e3 100755 --- a/toolbox/update-all-hooks.sh +++ b/toolbox/update-all-hooks.sh @@ -8,7 +8,7 @@ set -e base="$cfg_reporoot" hookbin="$cfg_basedir/hooks" -cut -d : -f 1 < "$cfg_chroot/etc/group" | grep -v _repo | \ +cut -d : -f 1 < "$cfg_chroot/etc/group" | grep -v ^_repo | \ ( while read proj; do projdir="$base/$proj.git" -- 2.11.4.GIT