From 6f81578e801450a6d1a9fa7e03df1932ae126ab3 Mon Sep 17 00:00:00 2001 From: Henric Andersson Date: Tue, 19 Jul 2016 16:06:35 -0700 Subject: [PATCH] Fixed custom config for good unset cannot be used unless you have the index. Good to know. --- plexupdate.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 460bea4..0de46bd 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -230,7 +230,14 @@ if [ "${AUTOUPDATE}" == "yes" ]; then echo "OK" popd >/dev/null - unset ALLARGS["-u"] + ALLARGS2=() + for A in ${ALLARGS} ; do + if [ ! "${A}" = "-u" ]; then + ALLARGS2+=(${A}) + fi + done + ALLARGS=("${ALLARGS[@]}") + if ! type "$0" 2>/dev/null >/dev/null ; then if [ -f "$0" ]; then /bin/bash "$0" -U ${ALLARGS[@]}