Add Npm, Cmd and Mount commands

This commit is contained in:
jpic 2020-01-28 02:04:19 +01:00
parent 85d3b98b64
commit 3ec981a1c1
4 changed files with 23 additions and 0 deletions

View File

@ -1,7 +1,10 @@
from .base import Base # noqa from .base import Base # noqa
from .cmd import Cmd # noqa
from .commit import Commit # noqa from .commit import Commit # noqa
from .config import Config # noqa from .config import Config # noqa
from .copy import Copy # noqa from .copy import Copy # noqa
from .npm import Npm # noqa
from .mount import Mount # noqa
from .packages import Packages # noqa from .packages import Packages # noqa
from .pip import Pip # noqa from .pip import Pip # noqa
from .run import Run # noqa from .run import Run # noqa

7
podctl/visitors/cmd.py Normal file
View File

@ -0,0 +1,7 @@
class Cmd:
def __init__(self, cmd):
self.cmd = cmd
def build(self, script):
# script._run() does not really support sudo code
script.run(self.cmd)

7
podctl/visitors/mount.py Normal file
View File

@ -0,0 +1,7 @@
class Mount:
def __init__(self, src, dst):
self.src = src
self.dst = dst
def build(self, script):
script.mount(self.src, self.dst)

6
podctl/visitors/npm.py Normal file
View File

@ -0,0 +1,6 @@
class Npm:
def __init__(self, install=None):
self.npm_install = install
def build(self, script):
script.append('""')