Create an O.S. specific rmdir command and use it

parent 073da780
......@@ -103,7 +103,7 @@ class Module(ModuleContent):
return
logging.debug("Removing " + self.path)
try:
command_tmp = (path_mod.del_command() + " " +
command_tmp = (path_mod.rmdir_command() + " " +
path_mod.relpath(self.path))
status_cmd = Popen(command_tmp,
stdout=PIPE,
......
......@@ -134,7 +134,7 @@ class ToolMakefile(object):
" $(LIBS) " + ' '.join(self._clean_targets["clean"])
self.writeln(tmp)
if path_mod.check_windows():
tmp = "\t\trmdir /s /q" + \
tmp = "\t\t" + path_mod.rmdir_command() + \
" $(LIBS) " + ' '.join(self._clean_targets["clean"])
self.writeln(tmp)
......
......@@ -189,6 +189,14 @@ def del_command():
return "rm -rf"
def rmdir_command():
"""Get a string with the O.S. specific remove directory command"""
if check_windows():
return "rmdir /s /q"
else:
return "rm -rf"
def copy_command():
"""Get a string with the O.S. specific copy command"""
if check_windows():
......
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