Commit c302240d authored by Yoshinori Okuji's avatar Yoshinori Okuji

Take arguments as a directory list. If not specified, assume the current directory.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5140 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9c92ca10
No related merge requests found
......@@ -94,16 +94,25 @@ def generateInformation(fd):
os.write(fd, '</repository>\n')
def main():
fd, path = tempfile.mkstemp()
try:
try:
generateInformation(fd)
finally:
os.close(fd)
except:
os.remove(path)
raise
if len(sys.argv) < 2:
dir_list = ['.']
else:
os.rename(path, 'bt5list')
dir_list = sys.argv[1:]
cwd = os.getcwd()
for d in dir_list:
os.chdir(d)
fd, path = tempfile.mkstemp()
try:
try:
generateInformation(fd)
finally:
os.close(fd)
except:
os.remove(path)
raise
else:
os.rename(path, 'bt5list')
os.chdir(cwd)
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment