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[@]}