Added support for antigen (#231)
This commit is contained in:
committed by
Roey Darwish Dror
parent
a2f355b256
commit
179ef615df
@@ -77,6 +77,7 @@ Just run `topgrade`. It will run the following steps:
|
|||||||
* **Unix**: Run [zr](https://github.com/jedahan/zr) update
|
* **Unix**: Run [zr](https://github.com/jedahan/zr) update
|
||||||
* **Unix**: Run [zplug](https://github.com/zplug/zplug) update
|
* **Unix**: Run [zplug](https://github.com/zplug/zplug) update
|
||||||
* **Unix**: Run [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) update
|
* **Unix**: Run [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) update
|
||||||
|
* **Unix**: Run [antigen](https://github.com/zsh-users/antigen) update
|
||||||
* **Unix**: Run [fisher](https://github.com/jorgebucaran/fisher)
|
* **Unix**: Run [fisher](https://github.com/jorgebucaran/fisher)
|
||||||
* **Unix**: Upgrade tmux plugins with [TPM](https://github.com/tmux-plugins/tpm). *Note*: Do not use
|
* **Unix**: Upgrade tmux plugins with [TPM](https://github.com/tmux-plugins/tpm). *Note*: Do not use
|
||||||
the `-b` flag in your configuration as suggested by the TPM readme.
|
the `-b` flag in your configuration as suggested by the TPM readme.
|
||||||
|
|||||||
@@ -285,6 +285,12 @@ fn run() -> Result<(), Error> {
|
|||||||
|| unix::run_zr(&base_dirs, run_type),
|
|| unix::run_zr(&base_dirs, run_type),
|
||||||
config.no_retry(),
|
config.no_retry(),
|
||||||
)?;
|
)?;
|
||||||
|
execute(
|
||||||
|
&mut report,
|
||||||
|
"antigen",
|
||||||
|
|| unix::run_antigen(&base_dirs, run_type),
|
||||||
|
config.no_retry(),
|
||||||
|
)?;
|
||||||
execute(
|
execute(
|
||||||
&mut report,
|
&mut report,
|
||||||
"zplug",
|
"zplug",
|
||||||
|
|||||||
@@ -27,6 +27,20 @@ fn zshrc(base_dirs: &BaseDirs) -> PathBuf {
|
|||||||
.unwrap_or_else(|_| base_dirs.home_dir().join(".zshrc"))
|
.unwrap_or_else(|_| base_dirs.home_dir().join(".zshrc"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_antigen(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||||
|
let zsh = require("zsh")?;
|
||||||
|
let zshrc = zshrc(base_dirs).require()?;
|
||||||
|
env::var("ADOTDIR")
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.unwrap_or_else(|_| base_dirs.home_dir().join("antigen.zsh"))
|
||||||
|
.require()?;
|
||||||
|
|
||||||
|
print_separator("antigen");
|
||||||
|
|
||||||
|
let cmd = format!("source {} && antigen selfupdate && antigen update", zshrc.display());
|
||||||
|
run_type.execute(zsh).args(&["-c", cmd.as_str()]).check_run()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn run_zplug(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
pub fn run_zplug(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||||
let zsh = require("zsh")?;
|
let zsh = require("zsh")?;
|
||||||
let zshrc = zshrc(base_dirs).require()?;
|
let zshrc = zshrc(base_dirs).require()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user