From 929d76ebf3fbcece4c36ab450eb1e8b425b30bae Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Fri, 2 Feb 2024 10:03:39 +0530 Subject: [PATCH] [scripts] ,project-configs-backup: Use find instead of fd find is more universal plus fd was just spiking up my cpu 100 --- scripts/.local/bin/random/,projects-config-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.local/bin/random/,projects-config-backup b/scripts/.local/bin/random/,projects-config-backup index bec17352..6e26c603 100755 --- a/scripts/.local/bin/random/,projects-config-backup +++ b/scripts/.local/bin/random/,projects-config-backup @@ -7,7 +7,7 @@ mkdir -p "$SAVEPATH" backup_loc() { tput el && echo "Saving $1..." - fd -HI '^\.git$' "$HOME/dev" | grep -v '/temp/' | + find "$HOME/dev" -type d -name '.git' | grep -v '/temp/' | while read -r path; do dir="$(dirname "$path")" [ -e "$dir/$1" ] || continue