Belle II Software development
decay_hash_interpreter.py
1#!/usr/bin/env python
2
3
10
11import subprocess
12import sys
13
14OLD = "decay_hash_interpreter.py"
15NEW = "b2decay-hash-interpreter.py"
16
17print(f"""\033[0;31mAttention:\033[0m {OLD} has been renamed to {NEW}.
18
19Some time ago the software group has decided that we should enforce a more
20systematic naming convention for command line tools. The old names have been
21kept for compatibility but will now be removed. The tool you tried to call is
22one of those which has been renamed.
23
24From now on please use \033[0;32m{NEW}\033[0m
25
26\033[0;31mAttention:\033[0m ${OLD} has been renamed to ${NEW}."""
27 )
28
29command = [NEW] + sys.argv[1:]
30print(f"\nRunning command {' '.join(command)}\n")
31subprocess.run(command, check=True)