Add rust, add do_update
This commit is contained in:
parent
dd1222e369
commit
cf0b9545b2
2 changed files with 16 additions and 5 deletions
12
install.py
12
install.py
|
@ -53,8 +53,8 @@ class Installer:
|
||||||
return
|
return
|
||||||
|
|
||||||
ui.info_2("Cloning", url, "->", pretty_dest)
|
ui.info_2("Cloning", url, "->", pretty_dest)
|
||||||
git_command = ["git", "clone", url, p_dest, "--branch", branch]
|
git_command = "git clone {} {} --branch {}".format(url, p_dest, branch)
|
||||||
subprocess.check_call(git_command)
|
subprocess.run(git_command, check=True)
|
||||||
|
|
||||||
def do_copy(self, src: str, dest: str) -> None:
|
def do_copy(self, src: str, dest: str) -> None:
|
||||||
"""Copy two files."""
|
"""Copy two files."""
|
||||||
|
@ -133,6 +133,14 @@ class Installer:
|
||||||
|
|
||||||
src_full.symlink(p_dest)
|
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:
|
def do_write(self, dest: str, content: str) -> None:
|
||||||
"""Write into a file."""
|
"""Write into a file."""
|
||||||
|
|
||||||
|
|
|
@ -187,6 +187,9 @@ configure_protonvpn() { # {{{
|
||||||
} # }}}
|
} # }}}
|
||||||
|
|
||||||
install_rust() { # {{{
|
install_rust() { # {{{
|
||||||
|
######
|
||||||
|
# OK #
|
||||||
|
######
|
||||||
|
|
||||||
# Install Rust
|
# Install Rust
|
||||||
|
|
||||||
|
@ -270,9 +273,9 @@ setup_bash_files() { # {{{
|
||||||
} # }}}
|
} # }}}
|
||||||
|
|
||||||
setup_bash_git_prompt() { # {{{
|
setup_bash_git_prompt() { # {{{
|
||||||
#########################
|
######
|
||||||
# NEED TO DO GIT UPDATE #
|
# OK #
|
||||||
#########################
|
######
|
||||||
|
|
||||||
# Clone bash-git-prompt
|
# Clone bash-git-prompt
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue