Add do_dependency, make vim a dependency of neovim, make process_program a private method
This commit is contained in:
parent
140e2f646e
commit
21db9f2a1e
1 changed files with 9 additions and 3 deletions
12
install.py
12
install.py
|
@ -311,6 +311,12 @@ class Installer:
|
||||||
|
|
||||||
self.base_dir.chdir()
|
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:
|
def do_symlink(self, src: str, dest: str, condition: str = "true") -> None:
|
||||||
"""Make a symlink to a file."""
|
"""Make a symlink to a file."""
|
||||||
|
|
||||||
|
@ -403,14 +409,14 @@ class Installer:
|
||||||
programs = list(self.conf.keys())
|
programs = list(self.conf.keys())
|
||||||
for program in programs:
|
for program in programs:
|
||||||
if ui.ask_yes_no("Do you wish to install {}?".format(program)):
|
if ui.ask_yes_no("Do you wish to install {}?".format(program)):
|
||||||
self.process_program(program)
|
self._process_program(program)
|
||||||
else:
|
else:
|
||||||
ui.info_2("Skipping {}".format(program))
|
ui.info_2("Skipping {}".format(program))
|
||||||
else:
|
else:
|
||||||
for program in programs:
|
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()).
|
"""Install one program (called by self.process()).
|
||||||
|
|
||||||
Call indivdual methods from the conf file.
|
Call indivdual methods from the conf file.
|
||||||
|
|
Loading…
Add table
Reference in a new issue