Add rust, add do_update

This commit is contained in:
flyingscorpio@arch-desktop 2020-04-19 12:35:00 +02:00
parent dd1222e369
commit cf0b9545b2
2 changed files with 16 additions and 5 deletions

View file

@ -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."""

View file

@ -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