aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-07-25 14:43:32 +0200
committerOlav Vitters <olav@vitters.nl>2020-07-25 14:43:32 +0200
commit708ceea5e5a504fb886144e4e74dc2b22ecdbf3d (patch)
treedc0a638a20f8bab278b85f66607d532162902454
parentf1bc36aedb6cd38a5f41ccb346ec68f8d28d11b2 (diff)
downloadrpm-helper-708ceea5e5a504fb886144e4e74dc2b22ecdbf3d.tar
rpm-helper-708ceea5e5a504fb886144e4e74dc2b22ecdbf3d.tar.gz
rpm-helper-708ceea5e5a504fb886144e4e74dc2b22ecdbf3d.tar.bz2
rpm-helper-708ceea5e5a504fb886144e4e74dc2b22ecdbf3d.tar.xz
rpm-helper-708ceea5e5a504fb886144e4e74dc2b22ecdbf3d.zip
create-file: ShellCheck: fix quoting issues
-rwxr-xr-xcreate-file8
1 files changed, 4 insertions, 4 deletions
diff --git a/create-file b/create-file
index d116650..4cda1b2 100755
--- a/create-file
+++ b/create-file
@@ -22,10 +22,10 @@ owner=$4 # owner of the file
group=$5 # group of the file
mode=$6 # mode of the file
-if [ ! -f $file ]; then
- touch $file
- chown $owner:$group $file
- chmod $mode $file
+if [ ! -f "$file" ]; then
+ touch "$file"
+ chown "$owner:$group" "$file"
+ chmod "$mode" "$file"
fi
# create-file ends here