diff options
Diffstat (limited to 'src/abslibre-tools/libredbdiff')
-rwxr-xr-x | src/abslibre-tools/libredbdiff | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/abslibre-tools/libredbdiff b/src/abslibre-tools/libredbdiff index 5d301f6..3fc505c 100755 --- a/src/abslibre-tools/libredbdiff +++ b/src/abslibre-tools/libredbdiff @@ -201,7 +201,7 @@ main() { ;; -h|--help) usage - return 0 + exit $EXIT_SUCCESS ;; --) break @@ -210,7 +210,7 @@ main() { done if $badargs; then usage >&2 - return 2 + exit $EXIT_INVALIDARGUMENT fi case $mode in @@ -218,7 +218,7 @@ main() { if [[ $# -gt 0 ]]; then print "%s: found non-flag arguments; a repo list may only be specified with the -n flag: %s" "$cmd" "$*" >&2 usage >&2 - return 2 + exit $EXIT_INVALIDARGUMENT fi main_update ;; @@ -226,7 +226,7 @@ main() { if [[ $# -gt 1 ]]; then print "%s: found too many non-flag arguments; only one repo may be specified: %s" "$cmd" "$*" >&2 usage >&2 - return 2 + exit $EXIT_INVALIDARGUMENT fi if [[ $# = 1 ]]; then if ! in_array "$1" "${repos[@]}"; then @@ -242,7 +242,7 @@ main_update() { if [[ $EUID != 0 ]]; then error "Must run as root to initialize or update %s databases." "$cmd" usage >&2 - exit 1 + exit $EXIT_NOPERMISSION fi load_conf libredbdiff.conf statedir mirror_prbl mirror_arch || exit @@ -305,7 +305,7 @@ main_compare() { then error "You must run %q with out arguments as root to initialize." "$cmd" usage >&2 - exit 1 + exit $EXIT_INVALIDARGUMENT fi local tmpdir |