提交脚本

This commit is contained in:
halliday 2023-11-22 22:58:03 +08:00
parent 9c90ec1891
commit f0d57397af
2 changed files with 31 additions and 0 deletions

2
bin/start_check.bat Normal file
View File

@ -0,0 +1,2 @@
@echo off
start python get_system_info.py %1

29
bin/start_check.sh Normal file
View File

@ -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