From 01bf09c816e0119d8d4264c9ee1ab70611a16450 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 6 Jan 2025 04:10:07 +0300 Subject: [PATCH] Add `fix-permissions-repos` --- fix-permissions-repos | 15 +++++++++++++++ pull-usrlocalsrc | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 fix-permissions-repos diff --git a/fix-permissions-repos b/fix-permissions-repos new file mode 100755 index 0000000..b8e01ca --- /dev/null +++ b/fix-permissions-repos @@ -0,0 +1,15 @@ +#! /bin/sh + +prog_dir="`dirname \"$0\"`" && + +cat "$prog_dir"/locate-all.list | + grep -v "^$HOME/Internet/WWW/htdocs/git.phdru.name/" | +while read d; do + echo "----- $d -----"; cd "$d" && + if test -d "$d/.git"; then cd "$d/.git"; fi && # bare repo + chmod -R u=rwX,go= . && + find objects -type f -exec chmod u=r,go= '{}' \+ +done && + +cd "$HOME/Internet/WWW/htdocs/git.phdru.name/" && +pwd && exec chmod -R u=rwX,go=rX . diff --git a/pull-usrlocalsrc b/pull-usrlocalsrc index c7159ad..4b524d7 100755 --- a/pull-usrlocalsrc +++ b/pull-usrlocalsrc @@ -6,7 +6,7 @@ has_remote() { prog_dir="`dirname \"$0\"`" && -cat "$prog_dir"/locate-all.list | grep -F /usr/local/src | +cat "$prog_dir"/locate-all.list | grep "^/usr/local/src/" | while read d; do echo "----- $d -----"; cd "$d" && if has_remote upstream && has_remote origin; then -- 2.39.5