Fix permissions for all files, not just .git

This commit is contained in:
Alex Malinovich 2016-11-29 20:15:59 -08:00
commit 5e27d1e8bd

View file

@ -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