aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-11-13 13:56:19 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-11-13 13:56:19 +1300
commit91e8c7a186b416ecc397e1a1406afac6a8132015 (patch)
tree9beea8f4792e5648388fc39e9afa377438a726c1 /bin
parentWhere did these tabs come from? (diff)
downloaddotfiles-91e8c7a186b416ecc397e1a1406afac6a8132015.tar.gz
dotfiles-91e8c7a186b416ecc397e1a1406afac6a8132015.zip
Remove unneeded intermediate var
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sue8
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/sue b/bin/sue
index 1c0ca10f..b626aafc 100755
--- a/bin/sue
+++ b/bin/sue
@@ -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" -- "$@"