mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 21:33:16 -07:00
Fix for no arguments causing error (#119)
This commit is contained in:
parent
6b8b40eb7a
commit
4c3bca05e5
1 changed files with 7 additions and 5 deletions
|
@ -156,6 +156,7 @@ trimQuotes() {
|
||||||
echo $__buffer
|
echo $__buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ ! $# -eq 0 ]; then
|
||||||
HASCFG="${@: -1}"
|
HASCFG="${@: -1}"
|
||||||
if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" -a ! "${@:(-2):1}" = "--config" ]; then
|
if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" -a ! "${@:(-2):1}" = "--config" ]; then
|
||||||
if [ -f "${HASCFG}" ]; then
|
if [ -f "${HASCFG}" ]; then
|
||||||
|
@ -163,6 +164,7 @@ if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" -a ! "${@:(-2):1}" = "--config"
|
||||||
CONFIGFILE=${HASCFG}
|
CONFIGFILE=${HASCFG}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Parse commandline
|
# Parse commandline
|
||||||
ALLARGS=( "$@" )
|
ALLARGS=( "$@" )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue