From ae1e3bf96fe4cbaa1dab1eb752e6e634ed9ed101 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Tue, 7 Mar 2023 18:42:58 -0500 Subject: [PATCH] Make updating 77% faster (20sec vs 1min 30sec) --- scripts/update_birdnet_snippets.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/update_birdnet_snippets.sh b/scripts/update_birdnet_snippets.sh index 65c24f1..560c941 100755 --- a/scripts/update_birdnet_snippets.sh +++ b/scripts/update_birdnet_snippets.sh @@ -7,8 +7,10 @@ HOME=$(awk -F: '/1000/ {print $6}' /etc/passwd) my_dir=$HOME/BirdNET-Pi/scripts # Sets proper permissions and ownership -sudo -E chown -R $USER:$USER $HOME/* -sudo chmod -R g+wr $HOME/* +#sudo -E chown -R $USER:$USER $HOME/* +#sudo chmod -R g+wr $HOME/* +find $HOME/* -not -user $USER -execdir sudo -E chown $USER:$USER {} \+ +find $HOME/* -not -user $USER -execdir sudo chmod g+wr {} \+ # Create blank sitename as it's optional. First time install will use $HOSTNAME. if ! grep SITE_NAME /etc/birdnet/birdnet.conf &>/dev/null;then