aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-07-25 14:07:43 +0200
committerOlav Vitters <olav@vitters.nl>2020-07-25 14:07:43 +0200
commit7dffce6cbb3e7bc8f70821a948e127d90e2b0538 (patch)
treeb6abe8407a198d54457dc8f2046089b6b96b5931
parent0a7281a5ebcf386df794334d9980b5febcb8ae49 (diff)
downloadrpm-helper-7dffce6cbb3e7bc8f70821a948e127d90e2b0538.tar
rpm-helper-7dffce6cbb3e7bc8f70821a948e127d90e2b0538.tar.gz
rpm-helper-7dffce6cbb3e7bc8f70821a948e127d90e2b0538.tar.bz2
rpm-helper-7dffce6cbb3e7bc8f70821a948e127d90e2b0538.tar.xz
rpm-helper-7dffce6cbb3e7bc8f70821a948e127d90e2b0538.zip
del-shell: ShellCheck: fix quoting and redirection without a command
-rwxr-xr-xdel-shell4
1 files changed, 2 insertions, 2 deletions
diff --git a/del-shell b/del-shell
index 7c9163e..e485697 100755
--- a/del-shell
+++ b/del-shell
@@ -23,12 +23,12 @@ CFG_FILE=/etc/shells
# Create $CFG_FILE if needed
if [ ! -f $CFG_FILE ]; then
- > $CFG_FILE
+ true > $CFG_FILE
exit 0
fi
if [ "$num" = 0 ]; then
- if [ ! -x $shl ]; then
+ if [ ! -x "$shl" ]; then
grep -v "^$shl$" < $CFG_FILE > $CFG_FILE.new
mv -f $CFG_FILE.new $CFG_FILE
fi