diff --git a/podctl/visitors/__init__.py b/podctl/visitors/__init__.py index f4af351..c98d50c 100644 --- a/podctl/visitors/__init__.py +++ b/podctl/visitors/__init__.py @@ -1,7 +1,10 @@ from .base import Base # noqa +from .cmd import Cmd # noqa from .commit import Commit # noqa from .config import Config # noqa from .copy import Copy # noqa +from .npm import Npm # noqa +from .mount import Mount # noqa from .packages import Packages # noqa from .pip import Pip # noqa from .run import Run # noqa diff --git a/podctl/visitors/cmd.py b/podctl/visitors/cmd.py new file mode 100644 index 0000000..024662d --- /dev/null +++ b/podctl/visitors/cmd.py @@ -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) diff --git a/podctl/visitors/mount.py b/podctl/visitors/mount.py new file mode 100644 index 0000000..1d904b9 --- /dev/null +++ b/podctl/visitors/mount.py @@ -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) diff --git a/podctl/visitors/npm.py b/podctl/visitors/npm.py new file mode 100644 index 0000000..ddaf904 --- /dev/null +++ b/podctl/visitors/npm.py @@ -0,0 +1,6 @@ +class Npm: + def __init__(self, install=None): + self.npm_install = install + + def build(self, script): + script.append('""')