From 46d264c7621cdb3e41335a0021cbe1d29490e3db Mon Sep 17 00:00:00 2001 From: Jon Shaulis Date: Wed, 7 Sep 2016 20:46:09 -0400 Subject: [PATCH] Give error message on old style config, but don't break --- plexupdate.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plexupdate.sh b/plexupdate.sh index 07eefef..7219a1a 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -149,6 +149,14 @@ trimQuotes() { echo $__buffer } +HASCFG="${@: -1}" +if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" ]; then + if [ -f "${HASCFG}" ]; then + echo "WARNING: Specifying config file as last argument is deprecated. Use --config instead." + CONFIGFILE=${HASCFG} + fi +fi + # Parse commandline ALLARGS=( "$@" ) optstring="acCdfFhlpqrSsuU -l config:,dldir:,email:,pass:,server:,saveconfig"