#!/bin/bash # new Env('BBK-wskey失效'); # export JD_LOG_XYZ_TOKEN="从机器人获取的token" # export BBK_WSKEY_ENC_KEY="" #加密/解密key,启用加密的时候需要用到 # export USE_BBK_WSKEY_EXIT="true" #启用退出,防止添加任务就自动执行,执行完毕后记得关闭 pwd _ftype="" use_get_arch=${BBK_ARCH} get_arch=`arch` if [ "$use_get_arch" != "" ]; then get_arch=$use_get_arch echo "指定运行$use_get_arch" fi echo $get_arch if [[ $get_arch =~ "x86_64" ]];then _ftype="linux-amd64" elif [[ $get_arch =~ "x86" ]];then _ftype="linux-386" elif [[ $get_arch =~ "i386" ]];then _ftype="linux-386" elif [[ $get_arch =~ "aarch64" ]];then _ftype="linux-arm64" elif [[ $get_arch =~ "arm" ]];then _ftype="linux-arm" else _ftype="" fi if [ $_ftype == "" ]; then echo "不支持的架构$get_arch" else echo "执行$_ftype" if [ -f "$PWD/BBK/$_ftype.bbk" ]; then echo "$PWD/BBK/$_ftype.bbk" eval "chmod +x ./BBK/$_ftype.bbk" eval "./BBK/$_ftype.bbk -t wskey_exit" else if [ ! -f "$PWD/$_ftype.bbk" ]; then echo "在$PWD/BBK目录、$PWD目录下均未找到文件$_ftype.bbk" exit 1 fi echo "$PWD/$_ftype.bbk" eval "chmod +x $PWD/$_ftype.bbk" eval "$PWD/$_ftype.bbk -t wskey_exit" fi fi