diff options
| author | 2024-07-18 23:27:17 +0000 | |
|---|---|---|
| committer | 2024-07-18 23:27:17 +0000 | |
| commit | 8a66409462db0eb2aad28cc9c08c4cbe9ed48fb9 (patch) | |
| tree | 7dfc7f81be1ac598aea0ff0563eaf53c6acf13ce | |
| parent | bd3fd1daca6056d75e286746e0b4cd1e9d87330f (diff) | |
| parent | 30f3662693132d39f94b66b46bcd7aaef4aaef65 (diff) | |
Merge "dirmods: Update to take absolute paths" into main
| -rwxr-xr-x | bin/dirmods | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/dirmods b/bin/dirmods index 52d935a5a..a6d4de3be 100755 --- a/bin/dirmods +++ b/bin/dirmods @@ -35,6 +35,14 @@ def main(): args = parser.parse_args() d = os.path.normpath(args.path) + # Fix absolute path to be relative to build top + if os.path.isabs(d): + base = os.environ.get('ANDROID_BUILD_TOP') + if base: + base = os.path.normpath(base) + os.path.sep + if d.startswith(base): + d = d[len(base):] + prefix = d + '/' module_info = modinfo.ReadModuleInfo() |