Check before installing starship. A bit o refactor
This commit is contained in:
parent
2360b3ec5e
commit
242089bb2c
54
copy.sh
54
copy.sh
|
@ -22,20 +22,26 @@ if [[ "$1" != "--install" ]]; then
|
||||||
done
|
done
|
||||||
|
|
||||||
touch "$HOME/.zsh_local"
|
touch "$HOME/.zsh_local"
|
||||||
else
|
exit 0
|
||||||
# Install required packages
|
fi
|
||||||
echo -n "Rust is "
|
|
||||||
if ! command -v cargo; then
|
# Install required packages
|
||||||
|
echo -n "Rust is "
|
||||||
|
if ! command -v cargo; then
|
||||||
echo "not installed. Installing..."
|
echo "not installed. Installing..."
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
else
|
else
|
||||||
echo "installed."
|
echo "already installed."
|
||||||
fi
|
fi
|
||||||
. "$HOME/.cargo/env"
|
|
||||||
if command -v cargo && ! command -v bat; then
|
. "$HOME/.cargo/env"
|
||||||
|
if command -v cargo && ! command -v bat; then
|
||||||
cargo install bat
|
cargo install bat
|
||||||
fi
|
fi
|
||||||
if ! test -d "$HOME/.nvm"; then
|
|
||||||
|
echo "nvm is "
|
||||||
|
if ! test -d "$HOME/.nvm"; then
|
||||||
|
echo "not installed. Installing..."
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
@ -44,14 +50,28 @@ else
|
||||||
nvm install 18
|
nvm install 18
|
||||||
nvm install node
|
nvm install node
|
||||||
nvm use node
|
nvm use node
|
||||||
fi
|
else
|
||||||
if ! command -v dotnet; then
|
echo "already installed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "dotnet is "
|
||||||
|
if ! command -v dotnet; then
|
||||||
|
echo "not installed. Installing..."
|
||||||
wget https://dot.net/v1/dotnet-install.sh -O /tmp/dotnet-install.sh
|
wget https://dot.net/v1/dotnet-install.sh -O /tmp/dotnet-install.sh
|
||||||
chmod +x /tmp/dotnet-install.sh
|
chmod +x /tmp/dotnet-install.sh
|
||||||
/tmp/dotnet-install.sh --version latest
|
/tmp/dotnet-install.sh --version latest
|
||||||
rm /tmp/dotnet-install.sh
|
rm /tmp/dotnet-install.sh
|
||||||
fi
|
else
|
||||||
curl -sS https://starship.rs/install.sh | sh
|
echo "already installed."
|
||||||
echo "Starship requires an NFont: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip"
|
|
||||||
echo "You may wish to install fzf"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "starship is "
|
||||||
|
if ! command -v starship; then
|
||||||
|
echo "not installed. Installing..."
|
||||||
|
curl -sS https://starship.rs/install.sh | sh
|
||||||
|
echo "Starship requires an NFont: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip"
|
||||||
|
else
|
||||||
|
echo "already installed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "You may wish to install fzf for sofi and other search"
|
||||||
|
|
Loading…
Reference in New Issue