summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2014-11-05 15:01:49 (GMT)
committerJan Huwald <jh@sotun.de>2014-11-05 15:01:49 (GMT)
commit5b6c4c26071b02b62c19fc4743060112a6f3019d (patch)
treefe2a5ba3f5971518d82a3856e9c29cf42d6884bf
parentb16afc1a9cbd90bfe5ffdae102158bdce1deb587 (diff)
style: increase density
-rwxr-xr-xanondcim30
1 files changed, 11 insertions, 19 deletions
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
-
contact: Jan Huwald // Impressum