Skip to content

Commit ec9facb

Browse files
committed
rundaca: allow that start folder is set on command line, can be used when restarting daca2.
1 parent c63d5cb commit ec9facb

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

tools/rundaca2.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77
import time
88
import sys
99

10+
START = '0'
1011
PASSWORD = ''
11-
if len(sys.argv) == 2:
12-
PASSWORD = sys.argv[1]
12+
for arg in sys.argv[1:]:
13+
if len(arg)==1:
14+
START = '0123456789abcdefghijklmnopqrstuvwxyz'.find(arg)
15+
if START < 0:
16+
START = 0
17+
else:
18+
PASSWORD = arg
1319

1420
# Upload file to sourceforge web server using scp
1521
def upload(file_to_upload, destination):
@@ -64,7 +70,7 @@ def daca2(foldernum):
6470
subprocess.call(['nice', '--adjustment=19', 'python', os.path.expanduser('~/cppcheck/tools/daca2-addons.py'), 'lib' + folder, '--rev=' + rev])
6571
upload(os.path.expanduser('~/daca2/lib' + folder + '/results.txt'), 'evidente/addons-lib' + folder + '.txt')
6672

67-
foldernum = 0
73+
foldernum = START
6874
while True:
6975
daca2(foldernum)
7076
foldernum = foldernum + 1

0 commit comments

Comments
 (0)