add check.sh for checking if the softwares are installed

This commit is contained in:
2025-04-21 16:48:40 +08:00
parent 2b08d06733
commit 5f6f3eacb0
2 changed files with 40 additions and 1 deletions

View File

@@ -12,8 +12,11 @@ if [ "$1" = "zsh" ]; then
echo "Config Oh My Zsh..." echo "Config Oh My Zsh..."
zsh "$current_dir/zsh/config_ohmyzsh.sh" zsh "$current_dir/zsh/config_ohmyzsh.sh"
elif [ "$i" = "p10k" ]; then elif [ "$i" = "p10k" ]; then
echo "Config Powerlevel10k..." echo "config powerlevel10k..."
zsh "$current_dir/zsh/config_p10k.sh" zsh "$current_dir/zsh/config_p10k.sh"
elif [ "$i" = "check" ]; then
echo "chcking uninstalled software..."
zsh "$current_dir/zsh/check.sh"
fi fi
done done
fi fi

36
zsh/check.sh Normal file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# check for git
if ! command -v git >/dev/null 2>&1; then
echo "Git is not installed."
fi
# check for python
if ! command -v python >/dev/null 2>&1; then
echo "Python is not installed."
fi
# check for rust
if ! command -v cargo >/dev/null 2>&1; then
echo "Rust is not installed."
fi
# check for verilator
if ! command -v verilator >/dev/null 2>&1; then
echo "Verilator is not installed."
fi
# check for iverilog
if ! command -v iverilog >/dev/null 2>&1; then
echo "iverilog is not installed."
fi
# check for OpenJDK
if ! command -v javac >/dev/null 2>&1; then
echo "OpenJDK is not installed."
fi
# check for sbt
if ! command -v sbt >/dev/null 2>&1; then
echo "sbt is not installed."
fi