misc: nit

This commit is contained in:
Dylan Araps 2021-07-19 11:42:13 +03:00
parent 4f8973732e
commit 75295c11e8
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 4 additions and 2 deletions

6
kiss
View File

@ -52,12 +52,14 @@ equ() {
ok() {
# Check if a string is non-null.
# This replaces '[ "$var" ]', '[ -n "$var" ]' and '[ -z "$var" ]'.
# This replaces '[ "$var" ]', '[ -n "$var" ]'.
case $1 in '') return 1 ;; *) return 0; esac
}
null() {
! ok "$1"
# Check if a string is non-null.
# This replaces '[ -z "$var" ]'.
case $1 in '') return 0 ;; *) return 1; esac
}
tmp_file() {