From 61e6dda32a90b644829528919d0f3cfc52c5a10d Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Fri, 10 Apr 2015 14:34:18 -0400 Subject: [PATCH] Now takes non-specified args as a file --- bin/convertMedia | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/convertMedia b/bin/convertMedia index e024eb5..0d4107b 100755 --- a/bin/convertMedia +++ b/bin/convertMedia @@ -137,6 +137,10 @@ function outputDir() { } function identifyUserFile() { + if [[ -n "${args}" ]]; then + userFile="${args}" + fi + if [[ -n "${userFile}" ]]; then #test -f "${f}" # Ensure that what we've found is a file extension="${userFile##*.}" # Grab file extension of input file @@ -153,9 +157,8 @@ function userFormat() { # Reads user input for format (-o, --output) # Override defaults with CLI if [ -n "$userOutput" ]; then - outputFormat="${userOutput,,}" + outputFormat="${userOutput,,}" && verbose "outputFormat=${outputFormat}" fi - verbose "outputFormat=${outputFormat}" } function doConvert() {