mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 12:59:40 -07:00
Changed method of expanding download directory
Found a somewhat nicer and more compatible way of expanding a path which handles ~ and spaces.
This commit is contained in:
parent
234315888d
commit
c280afea94
1 changed files with 2 additions and 4 deletions
|
@ -133,13 +133,11 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# Remove any ~ or other oddness in the path we're given
|
# Remove any ~ or other oddness in the path we're given
|
||||||
eval pushd "${DOWNLOADDIR}" > /dev/null 2>/dev/null
|
DOWNLOADDIR="$(eval cd ${DOWNLOADDIR/ /\\ } ; if [ $? -eq 0 ]; then pwd; fi)"
|
||||||
if [ $? -ne 0 ]; then
|
if [ -z "${DOWNLOADDIR}" ]; then
|
||||||
echo "Error: Download directory does not exist or is not a directory"
|
echo "Error: Download directory does not exist or is not a directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
DOWNLOADDIR="$(pwd)"
|
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
# Detect if we're running on redhat instead of ubuntu
|
# Detect if we're running on redhat instead of ubuntu
|
||||||
REDHAT=no;
|
REDHAT=no;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue