mirror of
https://github.com/zdharma-continuum/zinit-annex-rust.git
synced 2026-09-10 04:36:14 -04:00
Rename variables.
This commit is contained in:
parent
39cd2ce7eb
commit
ec3d7334db
|
|
@ -61,7 +61,7 @@ local nl=$'\n'
|
|||
return 0
|
||||
} # ]]]
|
||||
|
||||
if (( ${+ZINIT_ICE[rustup]} )) {
|
||||
if (( ${+ICE[rustup]} )) {
|
||||
if [[ $hook = *atclone-<-> ]] {
|
||||
(
|
||||
builtin cd -q "$dir" || {
|
||||
|
|
@ -79,7 +79,7 @@ if (( ${+ZINIT_ICE[rustup]} )) {
|
|||
}
|
||||
command chmod +x bin/rustup-init
|
||||
local -x CARGO_HOME="$dir" RUSTUP_HOME="$dir/rustup"
|
||||
if (( !ICE_OPTS[opt_-q,--quiet] )) {
|
||||
if (( !OPTS[opt_-q,--quiet] )) {
|
||||
print -P -- "%F{38}rust annex: %F{154}Running the rustup installer...%f"
|
||||
bin/rustup-init -y --no-modify-path |& command egrep '(installing|installed)'
|
||||
bin/rustup component remove rust-docs
|
||||
|
|
@ -96,7 +96,7 @@ if (( ${+ZINIT_ICE[rustup]} )) {
|
|||
return 1
|
||||
}
|
||||
local -x CARGO_HOME="$dir" RUSTUP_HOME="$dir/rustup" PATH="$dir/bin:$PATH"
|
||||
if (( !ICE_OPTS[opt_-q,--quiet] )) {
|
||||
if (( !OPTS[opt_-q,--quiet] )) {
|
||||
print -P -- "%F{38}rust annex: %F{154}Running \`rustup update'...%f"
|
||||
command rustup update |& command egrep -i '(error|warning|installing|info: latest update )'
|
||||
} else {
|
||||
|
|
@ -106,9 +106,9 @@ if (( ${+ZINIT_ICE[rustup]} )) {
|
|||
}
|
||||
}
|
||||
|
||||
if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
||||
if [[ -n "${ICE[cargo]}" ]] {
|
||||
local -a cargo_defs bin_pkg_dst tmpsdst cargos
|
||||
cargo_defs=( "${(s.;.)ZINIT_ICE[cargo]}" )
|
||||
cargo_defs=( "${(s.;.)ICE[cargo]}" )
|
||||
|
||||
local cargo
|
||||
|
||||
|
|
@ -132,14 +132,14 @@ if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
|||
(( ${#cargos} )) && {
|
||||
if [[ "$hook" = *atclone-<-> ]]; then
|
||||
print -P -- "%F{38}rust annex: %F{154}Instaling the requested crates...%f"
|
||||
if (( ${+ZINIT_ICE[rustup]} )) {
|
||||
if (( ${+ICE[rustup]} )) {
|
||||
local -x CARGO_HOME="$dir" RUSTUP_HOME="$dir/rustup" PATH="$dir/bin:$PATH"
|
||||
command $dir/bin/cargo install --force --root "$dir" "${cargos[@]}"
|
||||
} else {
|
||||
cargo install --force --root "$dir" "${cargos[@]}"
|
||||
}
|
||||
elif [[ "$hook" = *atpull-<-> ]]; then
|
||||
if (( !ICE_OPTS[opt_-q,--quiet] )) {
|
||||
if (( !OPTS[opt_-q,--quiet] )) {
|
||||
print -P -- "%F{38}rust annex: %F{154}Updating the installed crates...%f"
|
||||
}
|
||||
local toml_dir
|
||||
|
|
@ -148,7 +148,7 @@ if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
|||
for toml_dir ( ${tomls:h} ) {
|
||||
(
|
||||
builtin cd -q "$toml_dir" && {
|
||||
if (( ${+ZINIT_ICE[rustup]} )) {
|
||||
if (( ${+ICE[rustup]} )) {
|
||||
local -x CARGO_HOME="$dir" RUSTUP_HOME="$dir/rustup" PATH="$dir/bin:$PATH"
|
||||
command $dir/bin/cargo update
|
||||
command $dir/bin/cargo build
|
||||
|
|
@ -163,9 +163,9 @@ if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
|||
}
|
||||
}
|
||||
|
||||
if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
||||
if [[ -n "${ICE[cargo]}" ]] {
|
||||
local -a cargos bin_pkg_dst
|
||||
cargos=( "${(s.;.)ZINIT_ICE[cargo]}" )
|
||||
cargos=( "${(s.;.)ICE[cargo]}" )
|
||||
|
||||
local cargo
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
|||
|
||||
.za-rust-bin-or-src-function-body 0 \
|
||||
"$fnam" "$target_binary" "$dir" \
|
||||
"${${(M)set_rust_home_vars:#1}:-${+ZINIT_ICE[rustup]}}" \
|
||||
"${${(M)set_rust_home_vars:#1}:-${+ICE[rustup]}}" \
|
||||
"$set_gem_home" "$set_node_path" "$set_cwd" \
|
||||
"$use_all_null" "$use_err_null" "$use_out_null"
|
||||
|
||||
|
|
@ -216,7 +216,7 @@ if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
|||
command chmod +x "$file"
|
||||
|
||||
if [[ -x $file ]]; then
|
||||
if (( !ICE_OPTS[opt_-q,--quiet] )) {
|
||||
if (( !OPTS[opt_-q,--quiet] )) {
|
||||
print -P -- "%F{38}rust annex: %F{154}${${hook:#*atclone-<->}:+Re-}Created the %F{220}$fnam%F{154} shim%f"
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ setopt extendedglob warncreateglobal typesetsilent noshortloops
|
|||
|
||||
local nl=$'\n'
|
||||
|
||||
if [[ -n "${ZINIT_ICE[cargo]}" ]] {
|
||||
if [[ -n "${ICE[cargo]}" ]] {
|
||||
local -a cargos bin_pkg_dst tmpsdst
|
||||
cargos=( "${(s.;.)ZINIT_ICE[cargo]}" )
|
||||
cargos=( "${(s.;.)ICE[cargo]}" )
|
||||
|
||||
local cargo
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue