summaryrefslogtreecommitdiffstats
path: root/scripts/buildhistory-diff
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-07 16:57:18 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-11 18:10:17 +0100
commit313e551b55d3fc6135b6c40d492d03463e7dfe18 (patch)
tree730bc9c4f011c5d2ae4ad586b457b965bcee69b5 /scripts/buildhistory-diff
parent069c46922ef4501bf10ebb5e769652b092604b81 (diff)
downloadpoky-313e551b55d3fc6135b6c40d492d03463e7dfe18.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. (From OE-Core rev: e4ccec2e4c2f521a2bb473083b42aefd494eea23) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/buildhistory-diff')
-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():
46 sys.exit(1) 46 sys.exit(1)
47 47
48 if not os.path.exists(options.buildhistory_dir): 48 if not os.path.exists(options.buildhistory_dir):
49 if options.buildhistory_dir == 'buildhistory/':
50 cwd = os.getcwd()
51 if os.path.basename(cwd) == 'buildhistory':
52 options.buildhistory_dir = cwd
53 if not os.path.exists(options.buildhistory_dir):
49 sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % options.buildhistory_dir) 54 sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % options.buildhistory_dir)
50 parser.print_help() 55 parser.print_help()
51 sys.exit(1) 56 sys.exit(1)