Cleaned up cases where tools might be missing

This commit is contained in:
2024-11-14 21:06:38 +00:00
parent 9d138f41cd
commit 55748ff166
3 changed files with 44 additions and 33 deletions

View File

@@ -7,25 +7,23 @@ n_cpu := "$(($(grep -c ^processor /proc/cpuinfo)-2))"
apt +package:
#!/usr/bin/bash
for p in {{package}}; do
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' {{package}}|grep "install ok installed")
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $p |grep "install ok installed")
if [ "" = "$PKG_OK" ]; then
echo "No {{package}}. Setting up {{package}}."
sudo apt-get -qy install {{package}}
echo "No $p . Setting up $p ."
sudo apt-get -qy install $p
fi
done
cargo_update: (rust) (cargo "cargo-update")
cargo install-update -a
# Install a package using cargo
cargo +package: (rust)
#!/usr/bin/bash
# if [ "update" == {{package}} ]; then
# just cargo cargo-update
# cargo install-update -a
# exit 0
# fi
for p in {{package}}; do
echo $RESULT
RESULT=$(command -v $p)
if [ "" = "$RESULT" ]; then
cargo binstall {{package}} -y
cargo binstall $p -y
fi
done
@@ -45,6 +43,10 @@ zsh: (apt "zsh fzf build-essential") (duf) (lazygit) (cargo "eza zoxide bat fd-f
chsh -s $(which zsh)
antidote load
zsh_local:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
cloudflared: (apt "gdebi")
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo gdebi -n cloudflared-linux-amd64.deb