mkdir with proper owner
- using sudo only when not in user account + fix typo
This commit is contained in:
@ -468,9 +468,10 @@ class Show(Walker):
|
||||
|
||||
class Do(Walker):
|
||||
def newer(self, files):
|
||||
unix_cmd('mkdir', '-p', str(self.sysypath))
|
||||
usesudo = not self.syspath.is_relative_to(Path.home())
|
||||
unix_cmd('mkdir', '-p', str(self.syspath), sudo=usesudo)
|
||||
unix_cmd('cp', *(str(self.dirpath / f) for f in files), str(self.syspath),
|
||||
sudo=not self.syspath.is_relative_to(Path.home()))
|
||||
sudo=usesudo)
|
||||
|
||||
older = newer
|
||||
|
||||
|
Reference in New Issue
Block a user