From 79e5dc0b431c162f1a44ac8c8d8a5feaea879f24 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sat, 21 Aug 2010 13:03:22 +0200 Subject: [PATCH] install.sh: don't set owner (call chown) if not necessary --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ddf2a3d..86849bb 100755 --- a/install.sh +++ b/install.sh @@ -27,8 +27,12 @@ Copy_File() { fi Msg " " cp "$src" "$dst" || Abort - [ -n "$own" ] && chown "$own" "$dst" || Abort - [ -n "$perm" ] && chmod "$perm" "$dst" || Abort + if [ -n "$own" -a "$own" != "$USER" ]; then + chown "$own" "$dst" || Abort + fi + if [ -n "$perm" ]; then + chmod "$perm" "$dst" || Abort + fi Msg "- OK.\n" } -- 2.39.2