From 5e27d1e8bda002e7a47bb6974dd841da0729c565 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Tue, 29 Nov 2016 20:15:59 -0800 Subject: [PATCH] Fix permissions for all files, not just .git --- plexupdate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index fa568c4..3e31998 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -201,10 +201,10 @@ cleanup() { rm "$F" 2>/dev/null >/dev/null done - plexupdate_path="$(dirname $0)" - # Make sure .git permissions haven't been modified by running as sudo and not sudo on different occasions + plexupdate_path="$(dirname "$0")" + # Make sure permissions haven't been modified by running as sudo and not sudo on different occasions if [ -d "${plexupdate_path}/.git" ]; then - chown -R --reference="${plexupdate_path}" "${plexupdate_path}/.git" &> /dev/null + chown -R --reference="${plexupdate_path}" "${plexupdate_path}/" &> /dev/null fi } trap cleanup EXIT