diff options
author | Olav Vitters <olav@vitters.nl> | 2020-07-25 14:43:32 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-07-25 14:43:32 +0200 |
commit | 708ceea5e5a504fb886144e4e74dc2b22ecdbf3d (patch) | |
tree | dc0a638a20f8bab278b85f66607d532162902454 /create-file | |
parent | f1bc36aedb6cd38a5f41ccb346ec68f8d28d11b2 (diff) | |
download | rpm-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
Diffstat (limited to 'create-file')
-rwxr-xr-x | create-file | 8 |
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 |