diff options
-rw-r--r-- | src/opkbuild | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/opkbuild b/src/opkbuild index c4f834f..2c0d3f0 100644 --- a/src/opkbuild +++ b/src/opkbuild @@ -30,9 +30,9 @@ print_usage() error() { - printf 'opkbuild: [%s] Error\n' "${1}" >&2 + [ ${#} -eq 1 ] && printf 'opkbuild: [%s] Error\n' "${1}" >&2 if ${dbg}; then - printf 'opkbuild: Starting debugging shell...' >&2 + printf 'opkbuild: Starting debugging shell...\n' >&2 /bin/sh fi cd .. @@ -193,37 +193,37 @@ for binpkgdir in ../*.pkg/; do case ${?} in 1) printf 'opkbuild: Error: No source archive found\n' >&2 - exit 1 + error ;; 2) printf 'opkbuild: Error: Multiple source archives found\n' \ >&2 - exit 1 + error ;; 3) printf 'opkbuild: Error: %s\n' \ 'Unsupported archive compression format detected' >&2 - exit 1 + error ;; 4) printf 'opkbuild: Error: %s\n' \ 'No directories found in source archive' >&2 - exit 1 + error ;; 5) printf 'opkbuild: Error: %s\n' \ 'Multiple top-level directories found in source archive' >&2 - exit 1 + error ;; 6) printf 'opkbuild: Error: %s\n' \ 'Failed to extract source archive' >&2 - exit 1 + error ;; 7) printf 'opkbuild: Error: %s\n' \ 'Failed to move extracted sources' >&2 - exit 1 + error ;; esac fi |