forked from len0rd/rockbox
rockboxdev: fix issues with relative paths for commandline options
I wanted to build into a 'toolchain' directory like this: $ tools/rockboxdev.sh --dlwhere=toolchain --builddir=toolchain/build --prefix=toolchain/bin This failed twice: a) the extraction stage could not uncompress because of the relative paths, so convert them to absolute paths in the script to fix the issue. b) patches could not be applied because 'rockboxdevdir' was assigned a string with the directory twice and '\n' in the middle. Using readlink, this now works. Change-Id: I9c7c30812e1fb4b58db7e6561d73678f34714c91
This commit is contained in:
parent
a67c6934c1
commit
422aa56243
1 changed files with 5 additions and 1 deletions
|
@ -30,7 +30,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This is the absolute path to where the script resides.
|
# This is the absolute path to where the script resides.
|
||||||
rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
rockboxdevdir="$( readlink -f "$( dirname "${BASH_SOURCE[0]}" )" )"
|
||||||
|
|
||||||
if [ `uname -s` = "Darwin" ]; then
|
if [ `uname -s` = "Darwin" ]; then
|
||||||
parallel=`sysctl -n hw.physicalcpu`
|
parallel=`sysctl -n hw.physicalcpu`
|
||||||
|
@ -707,6 +707,10 @@ if [ -n "$missingtools" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dlwhere=$(readlink -f "$dlwhere")
|
||||||
|
prefix=$(readlink -f "$prefix")
|
||||||
|
builddir=$(readlink -f "$builddir")
|
||||||
|
|
||||||
echo "Download directory : $dlwhere (set RBDEV_DOWNLOAD or use --dlwhere= to change)"
|
echo "Download directory : $dlwhere (set RBDEV_DOWNLOAD or use --dlwhere= to change)"
|
||||||
echo "Install prefix : $prefix (set RBDEV_PREFIX or use --prefix= to change)"
|
echo "Install prefix : $prefix (set RBDEV_PREFIX or use --prefix= to change)"
|
||||||
echo "Build dir : $builddir (set RBDEV_BUILD or use --builddir= to change)"
|
echo "Build dir : $builddir (set RBDEV_BUILD or use --builddir= to change)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue