diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2021-01-31 10:11:23 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-02-05 17:29:05 +0000 |
commit | 422aa56243c8c65d1414afa08e5ce2cade79ad2d (patch) | |
tree | ce72a51699a228b783d20b8852d2111217d1500b /tools/rockboxdev.sh | |
parent | a67c6934c1674ce7f5db9047b43d339b576ea881 (diff) | |
download | rockbox-422aa56243c8c65d1414afa08e5ce2cade79ad2d.tar.gz rockbox-422aa56243c8c65d1414afa08e5ce2cade79ad2d.zip |
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
Diffstat (limited to 'tools/rockboxdev.sh')
-rwxr-xr-x | tools/rockboxdev.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index d9b5ecd524..ac21a4c524 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh | |||
@@ -30,7 +30,7 @@ else | |||
30 | fi | 30 | fi |
31 | 31 | ||
32 | # This is the absolute path to where the script resides. | 32 | # This is the absolute path to where the script resides. |
33 | rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 33 | rockboxdevdir="$( readlink -f "$( dirname "${BASH_SOURCE[0]}" )" )" |
34 | 34 | ||
35 | if [ `uname -s` = "Darwin" ]; then | 35 | if [ `uname -s` = "Darwin" ]; then |
36 | parallel=`sysctl -n hw.physicalcpu` | 36 | parallel=`sysctl -n hw.physicalcpu` |
@@ -707,6 +707,10 @@ if [ -n "$missingtools" ]; then | |||
707 | exit 1 | 707 | exit 1 |
708 | fi | 708 | fi |
709 | 709 | ||
710 | dlwhere=$(readlink -f "$dlwhere") | ||
711 | prefix=$(readlink -f "$prefix") | ||
712 | builddir=$(readlink -f "$builddir") | ||
713 | |||
710 | echo "Download directory : $dlwhere (set RBDEV_DOWNLOAD or use --dlwhere= to change)" | 714 | echo "Download directory : $dlwhere (set RBDEV_DOWNLOAD or use --dlwhere= to change)" |
711 | echo "Install prefix : $prefix (set RBDEV_PREFIX or use --prefix= to change)" | 715 | echo "Install prefix : $prefix (set RBDEV_PREFIX or use --prefix= to change)" |
712 | echo "Build dir : $builddir (set RBDEV_BUILD or use --builddir= to change)" | 716 | echo "Build dir : $builddir (set RBDEV_BUILD or use --builddir= to change)" |