diff options
author | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
---|---|---|
committer | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
commit | da65f512a7e85293381b991ebb4c0417ac23fac6 (patch) | |
tree | 5d311b387b41ccb84925349dab7291d62251b400 /git-remote-gcrypt | |
parent | d6df0f14539152896eec981c8decdd4f02dba09c (diff) | |
download | git-remote-gcrypt-da65f512a7e85293381b991ebb4c0417ac23fac6.tar.gz |
Simplify isnull to use case
Diffstat (limited to 'git-remote-gcrypt')
-rwxr-xr-x | git-remote-gcrypt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt index 7d504f9..6f6a009 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -29,7 +29,7 @@ echo_git() { xecho "$@" ; } # Code clarity echo_info() { xecho "gcrypt:" "$@" >&2; } echo_die() { echo_info "$@" ; exit 1; } -isnull() { [ 0 = "${#1}" ]; } +isnull() { case "${1}" in "") true;; *) false;; esac; } isnonnull() { ! isnull "$1"; } iseq() { isnull "${1#"$2"}"; } isnoteq() { ! iseq "$@"; } |