aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/copyright.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6a4d269..ca79601 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2020-01-01 Joel Brobecker <brobecker@adacore.com>
+ * copyright.py (main): Exit if run from the wrong directory.
+
+2020-01-01 Joel Brobecker <brobecker@adacore.com>
+
* top.c (print_gdb_version): Change copyright year to 2020.
2020-01-01 Joel Brobecker <brobecker@adacore.com>
diff --git a/gdb/copyright.py b/gdb/copyright.py
index 84ead52..7771d9d 100644
--- a/gdb/copyright.py
+++ b/gdb/copyright.py
@@ -34,6 +34,7 @@ import datetime
import os
import os.path
import subprocess
+import sys
def get_update_list():
@@ -143,6 +144,8 @@ def main ():
"""The main subprogram."""
if not os.path.isfile("gnulib/import/extra/update-copyright"):
print "Error: This script must be called from the gdb directory."
+ sys.exit(1)
+
root_dir = os.path.dirname(os.getcwd())
os.chdir(root_dir)