From: root Date: Thu, 14 Feb 2013 00:00:00 +0000 (+0000) Subject: Simplify isnull to use case X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=da65f512a7e85293381b991ebb4c0417ac23fac6;p=gamesguru%2Fgit-remote-gcrypt.git Simplify isnull to use case --- 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 "$@"; }