]> Nutra Git (v1) - gamesguru/git-remote-gcrypt.git/commitdiff
Simplify isnull to use case
authorroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
committerroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
git-remote-gcrypt

index 7d504f9ea734327a00c6000b665a99e5c62b9bcf..6f6a009db363293778b7b4c50ba41afb80975ce3 100755 (executable)
@@ -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 "$@"; }