diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-11-13 13:56:19 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-11-13 13:56:19 +1300 |
commit | 91e8c7a186b416ecc397e1a1406afac6a8132015 (patch) | |
tree | 9beea8f4792e5648388fc39e9afa377438a726c1 /bin | |
parent | Where did these tabs come from? (diff) | |
download | dotfiles-91e8c7a186b416ecc397e1a1406afac6a8132015.tar.gz dotfiles-91e8c7a186b416ecc397e1a1406afac6a8132015.zip |
Remove unneeded intermediate var
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sue | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -33,13 +33,9 @@ case $1 in ;; esac -# Pull arguments into an array -declare -a files -files=("$@") - # Iterate through the files and check they all have the same owner user= -for file in "${files[@]}" ; do +for file ; do # Use stat(1) to get the file owner if ! file_owner=$(stat -c %U -- "$file") ; then @@ -63,5 +59,5 @@ done # If we got this far, there's at least one file and all the files are owned by # the same user; we can safely edit them -exec sudoedit -u "$user" -- "${files[@]}" +exec sudoedit -u "$user" -- "$@" |