diff options
Diffstat (limited to 'src/is_built')
-rwxr-xr-x | src/is_built | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/is_built b/src/is_built index 22c67a7..3fb09b6 100755 --- a/src/is_built +++ b/src/is_built @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Copyright (C) 2011-2012 Nicolás Reynolds <fauno@parabola.nu> # Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com> -# Copyright (C) 2013 Luke Shumaker <lukeshu@sbcglobal.net> +# Copyright (C) 2013, 2017 Luke Shumaker <lukeshu@sbcglobal.net> # # License: GNU GPLv3+ # @@ -41,13 +41,13 @@ usage() { main() { while getopts 'h' arg; do case $arg in - h) usage; exit 0 ;; - *) usage >&2; exit 2 ;; + h) usage; exit $EXIT_SUCCESS ;; + *) usage >&2; exit $EXIT_INVALIDARGUMENT ;; esac done if [[ $# -ne 1 ]] && [[ $# -ne 2 ]]; then usage >&2 - exit 2 + exit $EXIT_INVALIDARGUMENT fi pkg=${1} @@ -63,9 +63,9 @@ main() { # 1 : pver > ver if [[ $result -ge 0 ]] && [[ $r -eq 0 ]]; then - exit 0 + exit $EXIT_TRUE else - exit 1 + exit $EXIT_FALSE fi } |