From 21d36d06798527095000d719d03197d413383d57 Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Wed, 3 Jul 2024 11:45:41 -0400 Subject: [PATCH] fixed quoting issue for hiding hidden files. --- fetch-all.sh | 4 ++-- list-all.sh | 4 ++-- pull-all.sh | 4 ++-- status-all.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fetch-all.sh b/fetch-all.sh index fdf0015..42f9664 100755 --- a/fetch-all.sh +++ b/fetch-all.sh @@ -11,7 +11,7 @@ # check for "-l" and "-h" in command prompt followLinks="-H" -checkHidden="-not -path '*/.*/.git'" +checkHidden="*/.*/.git" while getopts "lh" option; do case $option in l) @@ -48,5 +48,5 @@ function process_git_fetch () { # and call process_git_fetch on each location that was found. # we then work on the folder that contained the ".git" folder. -find "$followLinks" "$@" -type d -name ".git" $checkHidden | sort | while read -r file; do process_git_fetch "$file"; done +find "$followLinks" "$@" -type d -name ".git" -not -path "$checkHidden" | sort | while read -r file; do process_git_fetch "$file"; done diff --git a/list-all.sh b/list-all.sh index cd24aeb..f652286 100755 --- a/list-all.sh +++ b/list-all.sh @@ -11,7 +11,7 @@ # check for "-l" and "-h" in command prompt followLinks="-H" -checkHidden="-not -path '*/.*/.git'" +checkHidden="*/.*/.git" while getopts "lh" option; do case $option in l) @@ -48,5 +48,5 @@ function process_git_list () { # and call process_git_list on each location that was found. # we then work on the folder that contained the ".git" folder. -find "$followLinks" "$@" -type d -name ".git" $checkHidden | sort | while read -r file; do process_git_list "$file"; done +find "$followLinks" "$@" -type d -name ".git" -not -path "$checkHidden" | sort | while read -r file; do process_git_list "$file"; done diff --git a/pull-all.sh b/pull-all.sh index 3122982..c96ac37 100755 --- a/pull-all.sh +++ b/pull-all.sh @@ -11,7 +11,7 @@ # check for "-l" and "-h" in command prompt followLinks="-H" -checkHidden="-not -path '*/.*/.git'" +checkHidden="*/.*/.git" while getopts "lh" option; do case $option in l) @@ -48,5 +48,5 @@ function process_git_pull () { # and call process_git_pull on each location that was found. # we then work on the folder that contained the ".git" folder. -find "$followLinks" "$@" -type d -name ".git" $checkHidden | sort | while read -r file; do process_git_pull "$file"; done +find "$followLinks" "$@" -type d -name ".git" -not -path "$checkHidden" | sort | while read -r file; do process_git_pull "$file"; done diff --git a/status-all.sh b/status-all.sh index 437fb4d..6948aec 100755 --- a/status-all.sh +++ b/status-all.sh @@ -11,7 +11,7 @@ # check for "-l" and "-h" in command prompt followLinks="-H" -checkHidden="-not -path '*/.*/.git'" +checkHidden="*/.*/.git" while getopts "lh" option; do case $option in l) @@ -104,5 +104,5 @@ function process_git_status () { # and call process_git_list on each location that was found. # we then work on the folder that contained the ".git" folder. -find "$followLinks" "$@" -type d -name ".git" $checkHidden | sort | while read -r file; do process_git_status "$file"; done +find "$followLinks" "$@" -type d -name ".git" -not -path "$checkHidden" | sort | while read -r file; do process_git_status "$file"; done