summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/buildhistory-diff9
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index 833f7c33a5..3bd40a2a1e 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -28,10 +28,12 @@ def get_args_parser():
28 %(prog)s [options] [from-revision [to-revision]] 28 %(prog)s [options] [from-revision [to-revision]]
29 (if not specified, from-revision defaults to build-minus-1, and to-revision defaults to HEAD)""") 29 (if not specified, from-revision defaults to build-minus-1, and to-revision defaults to HEAD)""")
30 30
31 default_dir = os.path.join(os.environ.get('BUILDDIR', '.'), 'buildhistory')
32
31 parser.add_argument('-p', '--buildhistory-dir', 33 parser.add_argument('-p', '--buildhistory-dir',
32 action='store', 34 action='store',
33 dest='buildhistory_dir', 35 dest='buildhistory_dir',
34 default='buildhistory/', 36 default=default_dir,
35 help="Specify path to buildhistory directory (defaults to buildhistory/ under cwd)") 37 help="Specify path to buildhistory directory (defaults to buildhistory/ under cwd)")
36 parser.add_argument('-v', '--report-version', 38 parser.add_argument('-v', '--report-version',
37 action='store_true', 39 action='store_true',
@@ -80,11 +82,6 @@ def main():
80 parser.print_help() 82 parser.print_help()
81 83
82 sys.exit(1) 84 sys.exit(1)
83 if not os.path.exists(args.buildhistory_dir):
84 if args.buildhistory_dir == 'buildhistory/':
85 cwd = os.getcwd()
86 if os.path.basename(cwd) == 'buildhistory':
87 args.buildhistory_dir = cwd
88 85
89 if not os.path.exists(args.buildhistory_dir): 86 if not os.path.exists(args.buildhistory_dir):
90 sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % args.buildhistory_dir) 87 sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % args.buildhistory_dir)