From 89fe968c0ae8dad16bbbceb584b2ebbeff8eb82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Fran=C3=A7a?= Date: Wed, 29 Jan 2025 23:16:30 +0000 Subject: [PATCH] Jan-29 23h16: dot --- scripts/dot | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/dot b/scripts/dot index c9fad08..4f4c974 100755 --- a/scripts/dot +++ b/scripts/dot @@ -8,7 +8,17 @@ export CARGO_PATH="${NAVI_HOME}/core/Cargo.toml" # TODO: bump dotfiles + remove this fn log::note() { log::info "$@"; } -export -f log::note + +cargo() { + if [ "${1:-}" = "install" ] && [ "${2:-}" = "cross" ]; then + shift 2 || true + command cargo install cross --git https://github.com/cross-rs/cross "$@" + else + command cargo "$@" + fi +} + +export -f log::note cargo dot::clone() { git clone 'https://github.com/denisidoro/dotfiles' "$DOTFILES" @@ -24,4 +34,4 @@ dot::clone_if_necessary() { dot::clone_if_necessary -"${DOTFILES}/bin/dot" "$@" \ No newline at end of file +"${DOTFILES}/bin/dot" "$@"