From ec9facb701ca73201a4b40c9d5efbf00d3ac2a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 8 Feb 2016 09:28:02 +0100 Subject: [PATCH] rundaca: allow that start folder is set on command line, can be used when restarting daca2. --- tools/rundaca2.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/rundaca2.py b/tools/rundaca2.py index 66f084cbb..1c0b5a86c 100644 --- a/tools/rundaca2.py +++ b/tools/rundaca2.py @@ -7,9 +7,15 @@ import shutil import time import sys +START = '0' PASSWORD = '' -if len(sys.argv) == 2: - PASSWORD = sys.argv[1] +for arg in sys.argv[1:]: + if len(arg)==1: + START = '0123456789abcdefghijklmnopqrstuvwxyz'.find(arg) + if START < 0: + START = 0 + else: + PASSWORD = arg # Upload file to sourceforge web server using scp def upload(file_to_upload, destination): @@ -64,7 +70,7 @@ def daca2(foldernum): subprocess.call(['nice', '--adjustment=19', 'python', os.path.expanduser('~/cppcheck/tools/daca2-addons.py'), 'lib' + folder, '--rev=' + rev]) upload(os.path.expanduser('~/daca2/lib' + folder + '/results.txt'), 'evidente/addons-lib' + folder + '.txt') -foldernum = 0 +foldernum = START while True: daca2(foldernum) foldernum = foldernum + 1