aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-06 10:52:04 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-07 10:03:49 +1200
commit17a069a55a17282fbbad85b8b2bf1f2027b126d4 (patch)
treee7fa3274551c4dd7951935190cd5ae8c7ec39a92
parent901659a51cd53625a93f57a9c5865e90a07ec09d (diff)
downloadopenembedded-core-contrib-17a069a55a17282fbbad85b8b2bf1f2027b126d4.tar.gz
buildhistory-diff: operate from buildhistory directory
If the cwd is named "buildhistory" and the user hasn't specified an alternative path on the command line, then assume that the current directory is the buildhistory directory. This makes it easier to run buildhistory-diff and also interact with the buildhistory git repository as you no longer have to jump into the buildhistory directory and up to the parent again when doing so. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rwxr-xr-xscripts/buildhistory-diff5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index d8ca12d3e6..e03ccc5ed8 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -46,6 +46,11 @@ def main():
sys.exit(1)
if not os.path.exists(options.buildhistory_dir):
+ if options.buildhistory_dir == 'buildhistory/':
+ cwd = os.getcwd()
+ if os.path.basename(cwd) == 'buildhistory':
+ options.buildhistory_dir = cwd
+ if not os.path.exists(options.buildhistory_dir):
sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % options.buildhistory_dir)
parser.print_help()
sys.exit(1)