diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-04-19 00:53:48 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-04-22 05:43:52 +0200 |
commit | 4d8a616496b4b46b957cd89f037edfb2ca19e89d (patch) | |
tree | aab38cee630830b02e7e32c25841bdc573d4ca45 /lsinitcpio | |
parent | d13917104528fba28cd110373f130b3149002782 (diff) | |
download | mkinitcpio-4d8a616496b4b46b957cd89f037edfb2ca19e89d.tar.gz mkinitcpio-4d8a616496b4b46b957cd89f037edfb2ca19e89d.tar.xz |
lsinitcpio: avoid exiting from usage
Print a more helpful message when no image is specified.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lsinitcpio')
-rwxr-xr-x | lsinitcpio | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -24,7 +24,6 @@ usage: ${0##*/} [options] <initramfs> -x, --extract extract image to disk USAGE - exit 1 } decomp() { @@ -75,7 +74,8 @@ while :; do -a|--analyze) analyze=1 ;; -h|--help) - usage ;; + usage + exit 0 ;; -n|--nocolor) color=0 ;; -v|--verbose) @@ -111,8 +111,8 @@ if [[ -t 1 ]] && (( color )); then fi readonly NC BOLD BLUE GREEN RED YELLOW -[[ $image ]] || usage -[[ -f $image ]] || die "$image: No such file" +[[ $image ]] || die "No image specified (use -h for help)" +[[ -f $image ]] || die "No such file: $image" # read compression type case "$(file -Lb "$image")" in |