From: Mike Frysinger Date: Tue, 17 Oct 2017 03:50:40 +0000 (-0400) Subject: imgcrush: parse multiple arguments correctly X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a91ff5e1bd4b48a6dddae445bbf1956ffaea6736;p=home.git imgcrush: parse multiple arguments correctly --- diff --git a/.bin/imgcrush b/.bin/imgcrush index 3f04460..51ba343 100755 --- a/.bin/imgcrush +++ b/.bin/imgcrush @@ -21,6 +21,7 @@ crush() { case $1 in *.jpg|*.jpeg) crush_jpg "$1" ;; *.png) crush_png "$1" ;; + *) echo "${0##*/}: unsupported format: $1" >&2 ;; esac } @@ -31,7 +32,7 @@ main() { case $1 in -h) usage ;; -*) usage 1 ;; - *) crush "$1" ;; + *) crush "$1"; shift ;; esac done }