mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-09 13:43:46 -05:00
Now takes non-specified args as a file
This commit is contained in:
@@ -137,6 +137,10 @@ function outputDir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function identifyUserFile() {
|
function identifyUserFile() {
|
||||||
|
if [[ -n "${args}" ]]; then
|
||||||
|
userFile="${args}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "${userFile}" ]]; then
|
if [[ -n "${userFile}" ]]; then
|
||||||
#test -f "${f}" # Ensure that what we've found is a file
|
#test -f "${f}" # Ensure that what we've found is a file
|
||||||
extension="${userFile##*.}" # Grab file extension of input file
|
extension="${userFile##*.}" # Grab file extension of input file
|
||||||
@@ -153,9 +157,8 @@ function userFormat() {
|
|||||||
# Reads user input for format (-o, --output)
|
# Reads user input for format (-o, --output)
|
||||||
# Override defaults with CLI
|
# Override defaults with CLI
|
||||||
if [ -n "$userOutput" ]; then
|
if [ -n "$userOutput" ]; then
|
||||||
outputFormat="${userOutput,,}"
|
outputFormat="${userOutput,,}" && verbose "outputFormat=${outputFormat}"
|
||||||
fi
|
fi
|
||||||
verbose "outputFormat=${outputFormat}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function doConvert() {
|
function doConvert() {
|
||||||
|
|||||||
Reference in New Issue
Block a user