From 5b6c4c26071b02b62c19fc4743060112a6f3019d Mon Sep 17 00:00:00 2001 From: Jan Huwald Date: Wed, 5 Nov 2014 16:01:49 +0100 Subject: style: increase density diff --git a/anondcim b/anondcim index def65b1..38009b5 100755 --- a/anondcim +++ b/anondcim @@ -32,23 +32,17 @@ file_prefix="" dst_size="1280" dst_dir="" -while getopts ':p:s:d:' OPTION -do +while getopts ':p:s:d:' OPTION; do case $OPTION in - "p") - file_prefix="${OPTARG}" - ;; - "s") - dst_size="$OPTARG" - ;; - "d") - # enforce a trailing "/" - [ -d "${OPTARG%/}/" ] && dst_dir="${OPTARG%/}/" || die "destination directory \"${OPTARG%/}/\" does not exist" - ;; - *) - err "not recognised: OPTION=$OPTION, OPTARG=$OPTARG" - die_usage - ;; + "p") file_prefix="${OPTARG}";; + "s") dst_size="$OPTARG";; + "d") # enforce a trailing "/" + [ -d "${OPTARG%/}/" ] && dst_dir="${OPTARG%/}/" \ + || die "destination directory \"${OPTARG%/}/\" does not exist" + ;; + *) err "not recognised: OPTION=$OPTION, OPTARG=$OPTARG" + die_usage + ;; esac done shift $(($OPTIND - 1)) @@ -56,8 +50,7 @@ shift $(($OPTIND - 1)) cur=1 total=$# -for fn in "$@" -do +for fn in "$@"; do if [ -z "$dst_dir" ]; then # use the directory of the source file dst="$(dirname "$fn")/" @@ -105,4 +98,3 @@ EOF cur=$(($cur + 1)) done - -- cgit v0.10.1