aboutsummaryrefslogtreecommitdiff
path: root/build/tools
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2018-09-06 15:03:34 -0700
committerDan Albert <danalbert@google.com>2018-09-06 15:34:52 -0700
commitfe0fe5dc32682d1811d32492c3055becb512c147 (patch)
treea1d478bc60d91a10e2c84d908ad7aa4c22b10e39 /build/tools
parent8d208d050c690eed490883084e7a07a1e94c9db8 (diff)
downloadndk-fe0fe5dc32682d1811d32492c3055becb512c147.tar.gz
Fix make_standalone_toolchain.py's handling of ~.
Test: make_standalone_toolchain.py --install-dir=~/foo Test: ./run_tests.py --rebuild --filter 'standalone_toolchain*' Bug: None Change-Id: Ie04c596398bdcb40f6d97c7c4f43c863e747e589
Diffstat (limited to 'build/tools')
-rwxr-xr-xbuild/tools/make_standalone_toolchain.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py
index 0d19f84f7..595fda29a 100755
--- a/build/tools/make_standalone_toolchain.py
+++ b/build/tools/make_standalone_toolchain.py
@@ -449,15 +449,18 @@ def parse_args():
parser.add_argument(
'-v', '--verbose', action='count', help='Increase output verbosity.')
+ def path_arg(arg):
+ return os.path.realpath(os.path.expanduser(arg))
+
output_group = parser.add_mutually_exclusive_group()
output_group.add_argument(
- '--package-dir', type=os.path.realpath, default=os.getcwd(),
+ '--package-dir', type=path_arg, default=os.getcwd(),
help=('Build a tarball and install it to the given directory. If '
'neither --package-dir nor --install-dir is specified, a '
'tarball will be created and installed to the current '
'directory.'))
output_group.add_argument(
- '--install-dir', type=os.path.realpath,
+ '--install-dir', type=path_arg,
help='Install toolchain to the given directory instead of packaging.')
return parser.parse_args()