-def codeliteProjectGenerator(project_info):
- template = open("cltemplates/bertos.project").read()
- filelist = "\n".join(codelite_project.clFiles(codelite_project.findSources(project_info.info("PROJECT_PATH")), project_info.info("PROJECT_PATH")))
- while template.find("$filelist") != -1:
- template = template.replace("$filelist", filelist)
- project_name = os.path.basename(project_info.info("PROJECT_PATH"))
- while template.find("$project") != -1:
- template = template.replace("$project", project_name)
- return template
-
-def codeliteWorkspaceGenerator(project_info):
- template = open("cltemplates/bertos.workspace").read()
- project_name = os.path.basename(project_info.info("PROJECT_PATH"))
- while template.find("$project") != -1:
- template = template.replace("$project", project_name)
- return template
-
+def replaceSeparators(path):
+ """
+ Replace the separators in the given path with unix standard separator.
+ """
+ if os.sep != "/":
+ while path.find(os.sep) != -1:
+ path = path.replace(os.sep, "/")
+ return path
+