Polish up bash scripts

- Use '-n' instead of '! -z'
- Quote all the things...
- Enclose variable references in '{}'

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2023-04-17 08:20:36 +02:00
parent 14d364bff7
commit 5b87c962e7
5 changed files with 23 additions and 23 deletions

View file

@ -14,8 +14,8 @@
function setup_cfg {
# Configuration
for i in data/*.data timewarrior.cfg; do
if [ -f "$i" ]; then
rm "$i" 2>&1 >/dev/null
if [ -f "${i}" ]; then
rm "${i}" >/dev/null 2>&1
fi
done