mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 05:13:19 -07:00
Fix for no arguments causing error
This commit is contained in:
parent
6b8b40eb7a
commit
1e758750cf
1 changed files with 7 additions and 5 deletions
|
@ -156,11 +156,13 @@ trimQuotes() {
|
|||
echo $__buffer
|
||||
}
|
||||
|
||||
HASCFG="${@: -1}"
|
||||
if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" -a ! "${@:(-2):1}" = "--config" ]; then
|
||||
if [ -f "${HASCFG}" ]; then
|
||||
echo "WARNING: Specifying config file as last argument is deprecated. Use --config <path> instead."
|
||||
CONFIGFILE=${HASCFG}
|
||||
if [ ! $# -eq 0 ]; then
|
||||
HASCFG="${@: -1}"
|
||||
if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" -a ! "${@:(-2):1}" = "--config" ]; then
|
||||
if [ -f "${HASCFG}" ]; then
|
||||
echo "WARNING: Specifying config file as last argument is deprecated. Use --config <path> instead."
|
||||
CONFIGFILE=${HASCFG}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue