diff --git a/install.py b/install.py old mode 100644 new mode 100755 index 0fdde12..5cf7fab --- a/install.py +++ b/install.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + """Main installer file. Shamelessly copied from https://github.com/dmerejkowsky/dotfiles. @@ -14,7 +16,7 @@ import ruamel.yaml class Installer: - """Regroups all the installation methods listed in the yml conf file.""" + """Regroups all the installation methods listed in the yaml conf file.""" def __init__(self, force: bool = False): self.conf = ruamel.yaml.safe_load( # type: ignore @@ -34,7 +36,7 @@ class Installer: """Do the git clone.""" p_dest = Path(dest).expanduser() - pretty_dest = self.pretty_path(dest) + pretty_dest = self.pretty_path(p_dest) p_dest.parent.makedirs_p() if p_dest.exists(): @@ -52,7 +54,7 @@ class Installer: """Copy two files.""" p_dest = Path(dest).expanduser() - pretty_dest = self.pretty_path(dest) + pretty_dest = self.pretty_path(p_dest) p_dest.parent.makedirs_p() if p_dest.exists() and not self.force: @@ -69,7 +71,7 @@ class Installer: """Retrieve a file from a url.""" p_dest = Path(dest).expanduser() - pretty_dest = self.pretty_path(dest) + pretty_dest = self.pretty_path(p_dest) p_dest.parent.makedirs_p() if p_dest.exists() and not self.force: @@ -84,8 +86,8 @@ class Installer: def do_run(self, args: List[str]) -> None: """Run a command.""" - ui.info_2("Running", "`{}`".format(" ".join(args))) command = [x.format(home=self.home) for x in args] + ui.info_2("Running", "`{}`".format(" ".join(command))) subprocess.check_call(command) def do_symlink(self, src: str, dest: str) -> None: @@ -123,7 +125,7 @@ class Installer: """Write into a file.""" p_dest = Path(dest).expanduser() - pretty_dest = self.pretty_path(dest) + pretty_dest = self.pretty_path(p_dest) if p_dest.exists() and not self.force: ui.info_2("Skipping", pretty_dest) diff --git a/main_install.sh b/main_install.sh index d7661aa..1dc4e22 100755 --- a/main_install.sh +++ b/main_install.sh @@ -226,6 +226,9 @@ install_scripts() { # {{{ } # }}} markdown_mimetype() { # {{{ + ###### + # OK # + ###### # Add MIME type for reading .md files in Firefox (need to add extension too) @@ -246,6 +249,9 @@ markdown_mimetype() { # {{{ } # }}} setup_bash_files() { # {{{ + ###### + # OK # + ###### # Set up .bashrc