From d5791b2c8d6bd472e30e9c4b1619acfc528d8eb5 Mon Sep 17 00:00:00 2001 From: haturatu Date: Thu, 28 Nov 2024 19:52:28 +0900 Subject: cmd check --- lumebuild.sh | 9 +++++++++ 1 file changed, 9 insertions(+) mode change 100644 => 100755 lumebuild.sh diff --git a/lumebuild.sh b/lumebuild.sh old mode 100644 new mode 100755 index 4896658..3f17ff0 --- a/lumebuild.sh +++ b/lumebuild.sh @@ -15,6 +15,15 @@ COMMIT_COMMENT="`echo "Memory" && free -h | head -2 | awk '{print $(NF-5)"," $( export DENO_INSTALL="/home/$USER/.deno" export PATH="$DENO_INSTALL/bin:$PATH" +commands=("deno" "git" "toot" "cwebp") + +for cmd in "${commands[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Please install: $cmd" + exit 1 + fi +done + git_commit() { cd "$SRC_DIR" || exit ls "$SRC_DIR/.git" || git init || exit -- cgit v1.2.3