From: Alexander Barton Date: Sat, 21 Aug 2010 11:03:22 +0000 (+0200) Subject: install.sh: don't set owner (call chown) if not necessary X-Git-Url: https://arthur.ath.cx/gitweb/?a=commitdiff_plain;h=79e5dc0b431c162f1a44ac8c8d8a5feaea879f24;p=ConfigScripts.git install.sh: don't set owner (call chown) if not necessary --- 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" }