From 6092b9d93df1c3d5170a2b6aa0275aebef18bd37 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 25 May 2017 14:39:05 -0400 Subject: start moving things to use the libremessages exit codes --- src/is_built | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/is_built') 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 # Copyright (C) 2011-2012 Joshua Ismael Haase Hernández (xihh) -# Copyright (C) 2013 Luke Shumaker +# Copyright (C) 2013, 2017 Luke Shumaker # # 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 } -- cgit v1.2.2