diff --git a/document/linux/config/bash/module/own.sh b/document/linux/config/bash/module/own.sh index 0e814d1..2200f1b 100644 --- a/document/linux/config/bash/module/own.sh +++ b/document/linux/config/bash/module/own.sh @@ -1,24 +1,24 @@ # change file ownership to specified user id and restrict access to him. own() { - local file="$2" - local user="$1" + local file="${2}" + local user="${1}" # default to current dir. - if [ "$file" = "" ]; then + if [ "${file}" = "" ]; then file='.' fi # default to current user. - if [ "$user" = "" ]; then - user="$UID" + if [ "${user}" = "" ]; then + user="${UID}" fi # set ownership. - chown "$user":"$user" -R "$file" &> /dev/null + chown "${user}":"${user}" -R "${file}" &> /dev/null # remove access from group and others. - chmod -077 -R "$file" + chmod -077 -R "${file}" } # autocomplete.