From cf0b9545b2f34eaeda32daebe0510311fdb1933b Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Sun, 19 Apr 2020 12:35:00 +0200 Subject: [PATCH] Add rust, add do_update --- install.py | 12 ++++++++++-- main_install.sh | 9 ++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/install.py b/install.py index e6881d9..c72c562 100755 --- a/install.py +++ b/install.py @@ -53,8 +53,8 @@ class Installer: return ui.info_2("Cloning", url, "->", pretty_dest) - git_command = ["git", "clone", url, p_dest, "--branch", branch] - subprocess.check_call(git_command) + git_command = "git clone {} {} --branch {}".format(url, p_dest, branch) + subprocess.run(git_command, check=True) def do_copy(self, src: str, dest: str) -> None: """Copy two files.""" @@ -133,6 +133,14 @@ class Installer: src_full.symlink(p_dest) + def do_update(self, command: str) -> None: + """Run a command only if self.update is True.""" + + if self.update: + self.do_run(command) + else: + ui.info_2("Skipping", "`{}`".format(command)) + def do_write(self, dest: str, content: str) -> None: """Write into a file.""" diff --git a/main_install.sh b/main_install.sh index 36f8f2c..1ff0db9 100755 --- a/main_install.sh +++ b/main_install.sh @@ -187,6 +187,9 @@ configure_protonvpn() { # {{{ } # }}} install_rust() { # {{{ + ###### + # OK # + ###### # Install Rust @@ -270,9 +273,9 @@ setup_bash_files() { # {{{ } # }}} setup_bash_git_prompt() { # {{{ - ######################### - # NEED TO DO GIT UPDATE # - ######################### + ###### + # OK # + ###### # Clone bash-git-prompt