summaryrefslogtreecommitdiffstats
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:09:19 +0100
commite4ccec2e4c2f521a2bb473083b42aefd494eea23 (patch)
treeb0bee317133a415c09533e8a7a31b87c5fdfa6dd
parent340b3fa6be034bf6a4cd9b2d1ad4788668fabb5b (diff)
downloadopenembedded-core-contrib-e4ccec2e4c2f521a2bb473083b42aefd494eea23.tar.gz
openembedded-core-contrib-e4ccec2e4c2f521a2bb473083b42aefd494eea23.tar.bz2
openembedded-core-contrib-e4ccec2e4c2f521a2bb473083b42aefd494eea23.zip
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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)