diff --git a/rwx/os/pm/__init__.py b/rwx/os/pm/__init__.py index e359a88..d248e47 100644 --- a/rwx/os/pm/__init__.py +++ b/rwx/os/pm/__init__.py @@ -10,8 +10,13 @@ class PM(ABC): def __init__(self) -> None: """Set commands.""" + self.clean = self.get_clean_command() self.install = self.get_install_command() + @abstractmethod + def get_clean_command(self) -> Command: + """Command to clean packages cache.""" + @abstractmethod def get_install_command(self) -> Command: """Command to install package(s).""" @@ -19,5 +24,6 @@ class PM(ABC): def __str__(self) -> str: """Return commands.""" return f"""\ + clean = {self.clean} install = {self.install} """ diff --git a/rwx/os/pm/apt.py b/rwx/os/pm/apt.py index ac669b6..03217b8 100644 --- a/rwx/os/pm/apt.py +++ b/rwx/os/pm/apt.py @@ -7,6 +7,10 @@ from rwx.ps import Command class APT(PM): """Advanced Package Tool.""" + def get_clean_command(self) -> Command: + """Return clean command.""" + return Command() + def get_install_command(self) -> Command: """Return install command.""" return Command()