From cc64ae6004ef6a088cf45090f24e0993f97a0437 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Wed, 4 Dec 2024 15:07:24 -0600 Subject: [PATCH] Add an optional output directory argument to lintian-ppa --- lintian-ppa | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lintian-ppa b/lintian-ppa index 4b0d7e4..af7dca7 100755 --- a/lintian-ppa +++ b/lintian-ppa @@ -30,14 +30,19 @@ from launchpadlib.launchpad import Launchpad from pathlib import Path BASE_OUTPUT_DIR = "/srv/lubuntu-ci/output/" -LOG_DIR = os.path.join(BASE_OUTPUT_DIR, "logs/lintian/") parser = argparse.ArgumentParser(description="") parser.add_argument("--user", "-u", required=True) parser.add_argument("--ppa", "-p", required=True) parser.add_argument("--ppa2", "-p2") +parser.add_argument("--override-output", "-o") args = parser.parse_args() +if args.override_output: + BASE_OUTPUT_DIR = args.override_output + +LOG_DIR = os.path.join(BASE_OUTPUT_DIR, "logs/lintian/") + os.makedirs(LOG_DIR, exist_ok=True) current_time = datetime.utcnow().strftime("%H-%M-%S") log_file = os.path.join(LOG_DIR, f"{current_time}.log")