updating script can now take specific folders as arguments

This commit is contained in:
Bryan Herman 2013-08-12 13:59:47 -04:00
parent 34df32493d
commit 9a782eb6b5

View file

@ -4,11 +4,24 @@ import os
import sys
from subprocess import Popen, STDOUT, PIPE
# Check for arguments
if len(sys.argv) > 1:
folders = []
for i in range(len(sys.argv)):
if i == 0: continue
folders.append((sys.argv[i],' ',' '))
else:
folders = os.walk('.')
# Loop around directories
for root, dirs, files in os.walk('.'):
for root, dirs, files in folders:
# Delete first two characters
if root[0:2] == './':
root = root[2:]
# Don't continue if not prefixed by test
if root[2:6] != 'test':
if root[0:4] != 'test':
continue
# Go into that directory