committed by
GitHub
parent
098b60ba38
commit
729b5b6cb4
@@ -189,6 +189,7 @@ pub struct ConfigFile {
|
|||||||
cleanup: Option<bool>,
|
cleanup: Option<bool>,
|
||||||
notify_each_step: Option<bool>,
|
notify_each_step: Option<bool>,
|
||||||
accept_all_windows_updates: Option<bool>,
|
accept_all_windows_updates: Option<bool>,
|
||||||
|
bashit_branch: Option<String>,
|
||||||
only: Option<Vec<Step>>,
|
only: Option<Vec<Step>>,
|
||||||
composer: Option<Composer>,
|
composer: Option<Composer>,
|
||||||
brew: Option<Brew>,
|
brew: Option<Brew>,
|
||||||
@@ -528,6 +529,12 @@ impl Config {
|
|||||||
self.config_file.assume_yes.unwrap_or(self.opt.yes)
|
self.config_file.assume_yes.unwrap_or(self.opt.yes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Bash-it branch
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub fn bashit_branch(&self) -> &str {
|
||||||
|
self.config_file.bashit_branch.as_deref().unwrap_or("stable")
|
||||||
|
}
|
||||||
|
|
||||||
/// Whether to accept all Windows updates
|
/// Whether to accept all Windows updates
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn accept_all_windows_updates(&self) -> bool {
|
pub fn accept_all_windows_updates(&self) -> bool {
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ fn run() -> Result<()> {
|
|||||||
runner.execute(Step::Shell, "zim", || zsh::run_zim(&base_dirs, run_type))?;
|
runner.execute(Step::Shell, "zim", || zsh::run_zim(&base_dirs, run_type))?;
|
||||||
runner.execute(Step::Shell, "oh-my-zsh", || zsh::run_oh_my_zsh(&ctx))?;
|
runner.execute(Step::Shell, "oh-my-zsh", || zsh::run_oh_my_zsh(&ctx))?;
|
||||||
runner.execute(Step::Shell, "fisher", || unix::run_fisher(&base_dirs, run_type))?;
|
runner.execute(Step::Shell, "fisher", || unix::run_fisher(&base_dirs, run_type))?;
|
||||||
|
runner.execute(Step::Shell, "bash-it", || unix::run_bashit(&ctx))?;
|
||||||
runner.execute(Step::Shell, "oh-my-fish", || unix::run_oh_my_fish(&ctx))?;
|
runner.execute(Step::Shell, "oh-my-fish", || unix::run_oh_my_fish(&ctx))?;
|
||||||
runner.execute(Step::Tmux, "tmux", || tmux::run_tpm(&base_dirs, run_type))?;
|
runner.execute(Step::Tmux, "tmux", || tmux::run_tpm(&base_dirs, run_type))?;
|
||||||
runner.execute(Step::Tldr, "TLDR", || unix::run_tldr(run_type))?;
|
runner.execute(Step::Tldr, "TLDR", || unix::run_tldr(run_type))?;
|
||||||
|
|||||||
@@ -77,6 +77,17 @@ pub fn run_fisher(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
|||||||
run_type.execute(&fish).args(&["-c", "fisher update"]).check_run()
|
run_type.execute(&fish).args(&["-c", "fisher update"]).check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_bashit(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
ctx.base_dirs().home_dir().join(".bash_it").require()?;
|
||||||
|
|
||||||
|
print_separator("Bash-it");
|
||||||
|
|
||||||
|
ctx.run_type()
|
||||||
|
.execute("bash")
|
||||||
|
.args(&["-lc", &format!("bash-it update {}", ctx.config().bashit_branch())])
|
||||||
|
.check_run()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn run_oh_my_fish(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_oh_my_fish(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let fish = require("fish")?;
|
let fish = require("fish")?;
|
||||||
ctx.base_dirs()
|
ctx.base_dirs()
|
||||||
|
|||||||
Reference in New Issue
Block a user