aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/index-genenetwork9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/index-genenetwork b/scripts/index-genenetwork
index f79bfc1..9a5bd88 100755
--- a/scripts/index-genenetwork
+++ b/scripts/index-genenetwork
@@ -459,9 +459,12 @@ def is_data_modified(xapian_directory: str,
conn,
f"CHECKSUM TABLE {', '.join(db.get_metadata('tables').decode().split())}")
])
- click.echo(
- db.get_metadata("generif-checksum").decode() == hash_generif_graph(sparql_uri) and
- db.get_metadata("checksums").decode() == checksums)
+ # Return a zero exit status code when the data has changed;
+ # otherwise exit with a 1 exit status code.
+ if (db.get_metadata("generif-checksum").decode() == hash_generif_graph(sparql_uri) and
+ db.get_metadata("checksums").decode() == checksums):
+ sys.exit(1)
+ sys.exit(0)
@click.command(help="Index GeneNetwork data and build Xapian search index in XAPIAN_DIRECTORY.")