From c8e0c69a54abe224a18f43a25a5529561a7a80bd Mon Sep 17 00:00:00 2001 From: tianxin Date: Wed, 6 Nov 2024 11:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0centos=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/wvp.sh | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 bin/wvp.sh diff --git a/bin/wvp.sh b/bin/wvp.sh new file mode 100644 index 000000000..d4d1c8515 --- /dev/null +++ b/bin/wvp.sh @@ -0,0 +1,115 @@ +#!/bin/bash + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +function log() { + message="[Polaris Log]: $1 " + case "$1" in + *"Fail"* | *"Error"* | *"请使用 root 或 sudo 权限运行此脚本"*) + echo -e "${RED}${message}${NC}" 2>&1 | tee -a + ;; + *"Success"*) + echo -e "${GREEN}${message}${NC}" 2>&1 | tee -a + ;; + *"Ignore"* | *"Jump"*) + echo -e "${YELLOW}${message}${NC}" 2>&1 | tee -a + ;; + *) + echo -e "${BLUE}${message}${NC}" 2>&1 | tee -a + ;; + esac +} +echo +cat <