mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 02:26:56 -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
|
||||
eval pushd "${DOWNLOADDIR}" > /dev/null 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
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
|
||||
fi
|
||||
DOWNLOADDIR="$(pwd)"
|
||||
popd > /dev/null
|
||||
|
||||
# Detect if we're running on redhat instead of ubuntu
|
||||
REDHAT=no;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue