From 5f6f3eacb02a6909555efc054991372d41b8d5dd Mon Sep 17 00:00:00 2001 From: gwbeip Date: Mon, 21 Apr 2025 16:48:40 +0800 Subject: [PATCH] add check.sh for checking if the softwares are installed --- polyjuice.sh | 5 ++++- zsh/check.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 zsh/check.sh diff --git a/polyjuice.sh b/polyjuice.sh index d906f69..2990b57 100644 --- a/polyjuice.sh +++ b/polyjuice.sh @@ -12,8 +12,11 @@ if [ "$1" = "zsh" ]; then echo "Config Oh My Zsh..." zsh "$current_dir/zsh/config_ohmyzsh.sh" elif [ "$i" = "p10k" ]; then - echo "Config Powerlevel10k..." + echo "config powerlevel10k..." zsh "$current_dir/zsh/config_p10k.sh" + elif [ "$i" = "check" ]; then + echo "chcking uninstalled software..." + zsh "$current_dir/zsh/check.sh" fi done fi diff --git a/zsh/check.sh b/zsh/check.sh new file mode 100644 index 0000000..a5407e1 --- /dev/null +++ b/zsh/check.sh @@ -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