aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/downloads.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-11 14:52:11 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-11 14:52:11 +1300
commit6e8c6c521ae5d60427634be01b82fe61a79f192b (patch)
tree5349fc3e9838c69dbb6fd69f0234ea921ea446ea /sh/profile.d/downloads.sh
parente21b52c1f133f5c1f59f88a1bc266101577da6b3 (diff)
downloaddotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.tar.gz
dotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.zip
Refactor some conditionals
Diffstat (limited to 'sh/profile.d/downloads.sh')
-rw-r--r--sh/profile.d/downloads.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/sh/profile.d/downloads.sh b/sh/profile.d/downloads.sh
index 865cb859..1a89bc3f 100644
--- a/sh/profile.d/downloads.sh
+++ b/sh/profile.d/downloads.sh
@@ -8,7 +8,7 @@ esac
[ -z "$TMUX" ] || return
# Not if ~/.hushlogin exists
-[ -e "$HOME"/.hushlogin ] && return
+! [ -e "$HOME"/.hushlogin ] || return
# Not if ~/.downloads doesn't
[ -f "$HOME"/.downloads ] || return
@@ -27,5 +27,7 @@ esac
printf 'You have %u unsorted files in %s.\n' "$#" "$dir"
lc=$((lc+1))
done < "$HOME"/.downloads
- [ "$((lc > 0))" -eq 1 ] && printf '\n'
+ if [ "$lc" -gt 0 ] ; then
+ printf '\n'
+ fi
)