I was still getting an error because only the first space in my DOWNLOADDIR was getting replaced. Adding the other / tells the expansion to match all occurrences.

This commit is contained in:
Andrew Parker 2015-09-30 23:58:58 -06:00
commit db8bebc94f

View file

@ -133,7 +133,7 @@ fi
# Remove any ~ or other oddness in the path we're given
DOWNLOADDIR="$(eval cd ${DOWNLOADDIR/ /\\ } ; if [ $? -eq 0 ]; then pwd; fi)"
DOWNLOADDIR="$(eval cd ${DOWNLOADDIR// /\\ } ; if [ $? -eq 0 ]; then pwd; fi)"
if [ -z "${DOWNLOADDIR}" ]; then
echo "Error: Download directory does not exist or is not a directory"
exit 1