From f0d57397af48ddaf4720f776e5264e0c97459db8 Mon Sep 17 00:00:00 2001 From: halliday Date: Wed, 22 Nov 2023 22:58:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/start_check.bat | 2 ++ bin/start_check.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 bin/start_check.bat create mode 100644 bin/start_check.sh diff --git a/bin/start_check.bat b/bin/start_check.bat new file mode 100644 index 0000000..62a3820 --- /dev/null +++ b/bin/start_check.bat @@ -0,0 +1,2 @@ +@echo off +start python get_system_info.py %1 diff --git a/bin/start_check.sh b/bin/start_check.sh new file mode 100644 index 0000000..7f3022d --- /dev/null +++ b/bin/start_check.sh @@ -0,0 +1,29 @@ +#!/bin/bash +#set -x + +PRG="$0" +while [ -h "$PRG" ]; do + ls=$(ls -ld "$PRG") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '.*/.*' >/dev/null; then + PRG="$link" + else + PRG=$(dirname "$PRG")/"$link" + fi +done +PRGDIR=$(dirname "$PRG") + +#full path +cd $PRGDIR +ROOT_DIR=$(pwd) +cd - >/dev/null + + +# 加载Python3环境 +if [ -f /opt/rh/rh-python38/enable ]; then + source /opt/rh/rh-python38/enable +fi + +python $ROOT_DIR/get_system_info.py $1 + +