diff --git a/install.py b/install.py index db32988..a8aaa03 100755 --- a/install.py +++ b/install.py @@ -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.