summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/is_built15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/is_built b/src/is_built
index 6aa9b66..e6797fd 100755
--- a/src/is_built
+++ b/src/is_built
@@ -2,23 +2,28 @@
cmd=${0##*/}
usage() {
- echo "Usage: $cmd pkgname pkgver"
+ echo "Usage: $cmd [-h] pkgname pkgver"
echo
echo "Detect if a given package version is already in repos"
- echo "Assuming you want greater or equal"
+ echo "Assuming you want greater or equal."
echo
echo "Example usage: $cmd 'pcre' '20'"
+ echo
+ echo "Exit status:"
+ echo " 0: The package is built"
+ echo " 1: The package has not built"
+ echo " >1: There was an error"
}
while getopts 'h' arg; do
case $arg in
h) usage; exit 0 ;;
- *) usage >&2; exit 1 ;;
+ *) usage >&2; exit 2 ;;
esac
done
if [[ $# != 2 ]]; then
- usage >&2;
- exit 1
+ usage >&2
+ exit 2
fi
pkg=${1}