Add do_dependency, make vim a dependency of neovim, make process_program a private method

This commit is contained in:
flyingscorpio@arch-desktop 2021-02-01 19:22:53 +01:00
parent 140e2f646e
commit 21db9f2a1e

View file

@ -311,6 +311,12 @@ class Installer:
self.base_dir.chdir()
def do_dependency(self, *programs: str) -> None:
"""Process a program from the config file as a dependency of another program."""
for program in programs:
self._process_program(program)
def do_symlink(self, src: str, dest: str, condition: str = "true") -> None:
"""Make a symlink to a file."""
@ -403,14 +409,14 @@ class Installer:
programs = list(self.conf.keys())
for program in programs:
if ui.ask_yes_no("Do you wish to install {}?".format(program)):
self.process_program(program)
self._process_program(program)
else:
ui.info_2("Skipping {}".format(program))
else:
for program in programs:
self.process_program(program)
self._process_program(program)
def process_program(self, program: str) -> None:
def _process_program(self, program: str) -> None:
"""Install one program (called by self.process()).
Call indivdual methods from the conf file.