- copy_files = [ 'grml-cheatcodes.txt', 'LICENSE.txt', 'md5sums', 'README.txt' ]
- # handle grml-version
- if not update_grml_versions(iso_mount, target):
- copy_files.append('grml-version')
-
- for myfile in copy_files:
- grml_file = search_file(myfile, iso_mount)
- if grml_file is None:
- logging.warn("Warning: file %s could not be found - can not install it", myfile)
- else:
- exec_rsync(grml_file, grml_target + myfile)
-
- grml_web_target = grml_target + '/web/'
- execute(mkdir, grml_web_target)
-
- for myfile in 'index.html', 'style.css':
- grml_file = search_file(myfile, iso_mount)
- if grml_file is None:
- logging.warn("Warning: file %s could not be found - can not install it", myfile)
- else:
- exec_rsync(grml_file, grml_web_target + myfile)
-
- grml_webimg_target = grml_web_target + '/images/'
- execute(mkdir, grml_webimg_target)
-
- for myfile in 'button.png', 'favicon.png', 'linux.jpg', 'logo.png':
- grml_file = search_file(myfile, iso_mount)
- if grml_file is None:
- logging.warn("Warning: file %s could not be found - can not install it", myfile)
- else:
- exec_rsync(grml_file, grml_webimg_target + myfile)
+ grml_prefixe = ["GRML", "grml"]
+ for prefix in grml_prefixe:
+ filename = "{0}/{1}/{2}".format(iso_mount, prefix, grml_flavour)
+ if os.path.exists(filename):
+ exec_rsync(filename, grml_target)
+ break
+ else:
+ logging.warn("Warning: could not find flavour directory for %s ", grml_flavour)