summaryrefslogtreecommitdiff
path: root/src/is_built
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-25 14:39:05 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-25 17:28:30 -0400
commit6092b9d93df1c3d5170a2b6aa0275aebef18bd37 (patch)
tree55627e026fa7f538f8085f0fb8ed1fffcce4fcbc /src/is_built
parentaedbebb0ea3c7b40dda987b43ff21475ef67f423 (diff)
start moving things to use the libremessages exit codes
Diffstat (limited to 'src/is_built')
-rwxr-xr-xsrc/is_built12
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
}