diff --git a/plexupdate.sh b/plexupdate.sh index b092d92..792e8c9 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -131,14 +131,13 @@ if [ "${AUTOINSTALL}" == "yes" ]; then fi fi -# Make sure download directory is sane -if [ ! -d "${DOWNLOADDIR}" ]; then + +# Remove any ~ or other oddness in the path we're given +eval pushd "${DOWNLOADDIR}" > /dev/null 2>/dev/null +if [ $? -ne 0 ]; then echo "Error: Download directory does not exist or is not a directory" exit 1 fi - -# Remove any ~ or other oddness in the path we're given -eval pushd "${DOWNLOADDIR}" > /dev/null DOWNLOADDIR="$(pwd)" popd > /dev/null