diff options
author | Chris Johns <chrisj@rtems.org> | 2018-01-18 13:16:47 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-01-18 13:16:47 +1100 |
commit | 3ddbd791b860404874396e70c221b7408d1da257 (patch) | |
tree | f219dd9d96a17c9831dbff2d3ed8656fc356c89c /source-builder/sb/path.py | |
parent | 5: Update SPARC chip errata workarounds (diff) | |
download | rtems-source-builder-3ddbd791b860404874396e70c221b7408d1da257.tar.bz2 |
sb: Add an orphan check to sb-check.
The orphans check lets you see which configuration and build set
files in the RSB are not referernced. You can audit the list and
remove any configuration files not being used. Top level
build set files are included so you need to becareful not to
remove something that is valid and useful. To run:
$ ./source-builder/sb-check --check-orphans
Diffstat (limited to 'source-builder/sb/path.py')
-rw-r--r-- | source-builder/sb/path.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py index 3bf4e0c..679436c 100644 --- a/source-builder/sb/path.py +++ b/source-builder/sb/path.py @@ -92,6 +92,14 @@ def abspath(path): path = shell(path) return shell(os.path.abspath(host(path))) +def relpath(path, start = None): + path = shell(path) + if start is None: + path = os.path.relpath(host(path)) + else: + path = os.path.relpath(host(path), start) + return shell(path) + def splitext(path): path = shell(path) root, ext = os.path.splitext(host(path)) |