mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
shell_helpers: don't print mkdir if directory already exists
Was generating too much output even when everything was already built.
This commit is contained in:
@@ -223,9 +223,10 @@ class ShellHelpers:
|
||||
shutil.copy2(src, dest)
|
||||
|
||||
def mkdir_p(self, d):
|
||||
self.print_cmd(['mkdir', d, LF])
|
||||
if not self.dry_run:
|
||||
os.makedirs(d, exist_ok=True)
|
||||
if not os.path.exists(d):
|
||||
self.print_cmd(['mkdir', d, LF])
|
||||
if not self.dry_run:
|
||||
os.makedirs(d)
|
||||
|
||||
def mv(self, src, dest, **kwargs):
|
||||
self.print_cmd(['mv', src, dest])
|
||||
|
||||
Reference in New Issue
Block a user