Commit e86002cf authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* chmod bt5list according to umask.

* check if python version is good or not.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28860 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eeac858c
#! /usr/bin/python2.5 #! /usr/bin/python
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -103,6 +103,10 @@ def generateInformation(fd): ...@@ -103,6 +103,10 @@ def generateInformation(fd):
os.write(fd, '</repository>\n') os.write(fd, '</repository>\n')
def main(): def main():
if sys.version < '2.5':
print "Python 2.4's tarfile.py has a bug that causes a broken bt5list."
print "Please use Python 2.5 or later for this script."
sys.exit(1)
if len(sys.argv) < 2: if len(sys.argv) < 2:
dir_list = ['.'] dir_list = ['.']
else: else:
...@@ -122,6 +126,9 @@ def main(): ...@@ -122,6 +126,9 @@ def main():
raise raise
else: else:
shutil.move(path, 'bt5list') shutil.move(path, 'bt5list')
cur_umask = os.umask(0666)
os.chmod('bt5list', 0666 - cur_umask)
os.umask(cur_umask)
os.chdir(cwd) os.chdir(cwd)
main() 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