From 28538af73b2054768e67c37ad971792ecc4ceea6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Tue, 23 Jul 2024 07:07:02 +0200 Subject: [PATCH] Update. --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index df32460..bad4222 100755 --- a/main.py +++ b/main.py @@ -237,13 +237,18 @@ def log_string(s): sys.stdout.flush() -now = time.strftime("%Y%m%d-%H%M%S", time.localtime()) +###################################################################### +# Create a time-stamped archive with the source code with open("this_run.sh", "w") as f: f.write(f"{' '.join(sys.argv)}\n") +now = time.strftime("%Y%m%d-%H%M%S", time.localtime()) + os.system(f"tar zcvf {args.result_dir}/src-{now}.tgz *.py *.sh") +###################################################################### + log_string(f"argv {' '.join(sys.argv)}") for n in vars(args): -- 2.39.5