From 4debaa2b926338d77728454e7083e812eddaa736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 20 Oct 2013 10:49:54 +0200 Subject: [PATCH] daca2: alloc passing rev to script --- tools/daca2.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/daca2.py b/tools/daca2.py index f012bf45a..df34f2cc2 100644 --- a/tools/daca2.py +++ b/tools/daca2.py @@ -171,7 +171,13 @@ if len(sys.argv) != 2: print('no folder given') sys.exit(1) -FOLDER = sys.argv[1] +FOLDER = None +REV = None +for arg in sys.argv[1:]: + if arg[:6] == '--rev=': + REV = arg[6:] + else: + FOLDER = arg archives = getpackages(FOLDER) time.sleep(30) @@ -191,7 +197,10 @@ os.chdir(workdir + FOLDER) try: results = open('results.txt', 'wt') - results.write('DATE ' + str(datetime.date.today()) + '\n\n') + results.write('DATE ' + str(datetime.date.today()) + '\n') + if REV: + results.write('GIT-REVISION ' + REV + '\n') + results.write('\n') results.close() for archive in archives: