Completely remove first install flag

This commit is contained in:
flyingscorpio@arch-desktop 2021-02-08 18:57:28 +01:00
parent 3d7c5fc6d6
commit ed33809680

View file

@ -22,7 +22,6 @@ class Installer:
def __init__(
self,
config: str,
first_install: bool = False,
force: bool = False,
hide_commands: bool = False,
update: bool = False,
@ -32,7 +31,6 @@ class Installer:
yaml = YAML(typ="safe")
self.conf = yaml.load(Path(config).text())
self.force = force
self.first_install = first_install
self.hide_commands = hide_commands
self.home = Path("~").expanduser()
self.operating_system = self.define_os()
@ -138,8 +136,6 @@ class Installer:
"debian": self.operating_system == "debian",
"force": self.force,
"no force": not self.force,
"first install": self.first_install,
"no first install": not self.first_install,
"update": self.update,
"no update": not self.update,
}
@ -394,7 +390,8 @@ class Installer:
if not content.endswith("\n"):
content += "\n"
p_dest.write_text(content, append=append)
if not p_dest.exists() or content not in p_dest.read_text():
p_dest.write_text(content, append=append)
def process(self, programs: Optional[List[str]] = None) -> None:
"""Install the programs provided.
@ -474,12 +471,6 @@ def main() -> None:
"--config",
help="Use CONFIG file (default: 'configs.yml')",
)
parser.add_argument(
"-i",
"--first_install",
action="store_true",
help="Assume the program is not installed",
)
parser.add_argument(
"-f",
"--force",
@ -526,7 +517,6 @@ def main() -> None:
else:
config = "configs.yml"
first_install = args.first_install
force = args.force
generate = args.generate
hide_commands = args.hide_commands
@ -536,7 +526,6 @@ def main() -> None:
installer = Installer(
config=config,
first_install=first_install,
force=force,
hide_commands=hide_commands,
update=update,