make dir if needed
This commit is contained in:
@ -19,7 +19,7 @@ import tempfile
|
||||
from pathlib import Path
|
||||
from subprocess import Popen, PIPE
|
||||
from ipaddress import IPv4Interface
|
||||
from os.path import getmtime
|
||||
from os.path import getmtime, exists
|
||||
from gitea import change_to_gitea
|
||||
|
||||
|
||||
@ -468,6 +468,7 @@ class Show(Walker):
|
||||
|
||||
class Do(Walker):
|
||||
def newer(self, files):
|
||||
unix_cmd('mkdir', '-p', str(self.sysypath))
|
||||
unix_cmd('cp', *(str(self.dirpath / f) for f in files), str(self.syspath),
|
||||
sudo=not self.syspath.is_relative_to(Path.home()))
|
||||
|
||||
|
Reference in New Issue
Block a user