diff --git a/bin/sde-create-iso b/bin/sde-create-iso index e3b5ab3..155d0ae 100644 --- a/bin/sde-create-iso +++ b/bin/sde-create-iso @@ -57,12 +57,12 @@ while [ $# -gt 0 ]; do create_usage exit 0 ;; - -s) media_size="$2" ; shift;; - -f) media_format="$2" ; shift;; - -p) name="$2" ; shift;; - -c) configs="$configs $2"; shift;; + -s) media_size="$2" ; shift ;; + -f) media_format="$2" ; shift ;; + -p) name="$2" ; shift ;; + -c) configs="$configs $2"; shift ;; --) shift; break ;; - *) echo_abort 1 "$1: Unknown argument, aborting." + *) echo_abort 1 "$1: Unknown argument, aborting." esac shift done @@ -76,17 +76,17 @@ fmtsize() echo $var | tr -d '[0-9]' | read strings if [-n "$numbers" ]; then case "$var" in - cd) media_size=700;; - dvd) media_size=4700;; - *) media_size=700;; + cd) media_size=700 ;; + dvd) media_size=4700 ;; + *) media_size=700 ;; esac else echo $strings | tr "[:upper:]" "[:lower:]" | read lstrings case "$lstrings" in - k|kb|kib|kylobytes|kilobites) media_size=$numbers/1024;; - m|mb|mib|megabytes|megabites) media_size=$numbers;; - g|gb|gib|gigabytes|gigabites) media_size=$numbers*1024;; - *) echo_abort 1 "$strings: Unknown size unit specified, aborting." + k|kb|kib|kylobytes|kilobites) media_size="$numbers"/1024 ;; + m|mb|mib|megabytes|megabites) media_size="$numbers" ;; + g|gb|gib|gigabytes|gigabites) media_size="$numbers"*1024 ;; + *) echo_abort 1 "$strings: Unknown size unit specified, aborting." esac fi }