1 Star 0 Fork 0

keyboardkiller/OrangePiProxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
OrangepiProxy.sh 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
Keyboardkiller 提交于 2022-05-20 21:48 . add action
#!/bin/bash
clear
set -e
### set color variables
green=$(echo -en "\e[92m")
yellow=$(echo -en "\e[93m")
red=$(echo -en "\e[91m")
orange=$(echo -en "\e[38;5;202m")
cyan=$(echo -en "\e[96m")
default=$(echo -en "\e[39m")
### sourcing all additional scripts
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
for script in "${SRCDIR}/OrangePiProxy/scripts/"*.sh; do . $script; done
for script in "${SRCDIR}/OrangePiProxy/scripts/ui/"*.sh; do . $script; done
for script in "${SRCDIR}/OrangePiProxy/scripts/proxy_option/"*.sh; do . $script; done
for script in "${SRCDIR}/OrangePiProxy/scripts/action/"*.sh; do . $script; done
### set some messages
warn_msg(){
echo -e "${red}<!!!!> $1${default}"
}
status_msg(){
echo; echo -e "${yellow}###### $1${default}"
}
ok_msg(){
echo -e "${green}>>>>>> $1${default}"
}
title_msg(){
echo -e "${cyan}$1${default}"
}
get_date(){
current_date=$(date +"%y%m%d-%H%M")
}
print_unkown_cmd(){
ERROR_MSG="Invalid command!"
}
print_msg(){
if [[ "$ERROR_MSG" != "" ]]; then
echo -e "${red}"
echo -e "#########################################################"
echo -e " $ERROR_MSG "
echo -e "#########################################################"
echo -e "${default}"
fi
if [ "$CONFIRM_MSG" != "" ]; then
echo -e "${green}"
echo -e "#########################################################"
echo -e " $CONFIRM_MSG "
echo -e "#########################################################"
echo -e "${default}"
fi
}
clear_msg(){
unset CONFIRM_MSG
unset ERROR_MSG
}
main_menu
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/keyboardkiller/OrangePiProxy.git
git@gitee.com:keyboardkiller/OrangePiProxy.git
keyboardkiller
OrangePiProxy
OrangePiProxy
main

搜索帮助