do not include bzr revert files

This commit is contained in:
j 2011-12-30 15:36:45 +05:30
parent 11cb7b1dc8
commit c596dd0e20

View file

@ -32,7 +32,7 @@ def build_oxjs(geo):
for theme in ['classic', 'modern']:
path = source_path + 'Ox.UI/themes/' + theme + '/svg/'
for filename in os.listdir(path):
if not filename[0] in '._':
if not filename[0] in '._' and not filename.endswith('~'):
key = theme + '/' + filename[:-4]
imageURLs[key] = os.path.join(path, filename).replace(source_path, '')
data = re.sub('\n\s+', '', read_file(path + filename))
@ -46,7 +46,8 @@ def build_oxjs(geo):
ui_files = {'build': [], 'dev': []}
for path, dirnames, filenames in os.walk(source_path):
for filename in filenames:
if not '_' in path and not filename[0] in '._'\
if not '_' in path and not filename[0] in '._' \
and not filename.endswith('~') \
and (geo or not '/Ox.Geo/' in path):
# write copies in build path
source = os.path.join(path, filename)
@ -109,6 +110,7 @@ def build_oxjs(geo):
# svgs are loaded as URLs or dataURLs
# browser images appear before load
if path != root and not '_' in path and not filename[0] in '._'\
and not filename.endswith('~') \
and not 'jquery' in filename\
and not ('/themes/' in path and filename.endswith('.css'))\
and not filename.endswith('.svg')\
@ -161,4 +163,4 @@ def write_path(file):
if __name__ == '__main__':
geo = False if sys.argv[-1] == '-nogeo' else True
build_oxjs(geo)
build_oxjs(geo)