This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 检查并获取 W_AI_API_KEY | |
if [ -z "$W_AI_API_KEY" ]; then | |
echo "未检测到 W_AI_API_KEY 环境变量,请输入你的 w.ai API 密钥:" | |
read -r W_AI_API_KEY | |
if [ -z "$W_AI_API_KEY" ]; then | |
echo "错误:未提供 API 密钥,脚本退出。" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 颜色设置 | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
RED='\033[0;31m' | |
YELLOW='\033[0;33m' | |
NC='\033[0m' # 无颜色 | |
# 检测操作系统 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
log_file="./deploy_rl_swarm_0.5.log" | |
info() { | |
echo -e "[INFO] $*" | tee -a "$log_file" | |
} | |
error() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 颜色设置 | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
RED='\033[0;31m' | |
YELLOW='\033[1;33m' | |
NC='\033[0m' # 无颜色 | |
# Nexus 相关目录 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 颜色设置 | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
RED='\033[0;31m' | |
YELLOW='\033[1;33m' | |
NC='\033[0m' # 无颜色 | |
# Nexus 相关目录 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# 定义日志函数,记录到文件和终端 | |
log_file="$HOME/infernet-deployment.log" | |
info() { echo "ℹ️ $1" | tee -a "$log_file"; } | |
warn() { echo "⚠️ $1" | tee -a "$log_file"; } | |
error() { echo "❌ 错误:$1" | tee -a "$log_file"; exit 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# WAI Protocol 部署脚本(不使用 PM2) | |
# 功能:安装缺失依赖、配置环境变量、生成可自恢复运行脚本 | |
set -e | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
YELLOW='\033[1;33m' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 颜色定义 | |
CYAN='\033[0;36m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
RESET='\033[0m' | |
# 日志文件 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 颜色设置 | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
RED='\033[0;31m' | |
NC='\033[0m' # 无颜色 | |
# 检测操作系统 | |
OS=$(uname -s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# === 基本信息 === | |
LOGFILE="$HOME/install_log_$(date +%F_%H-%M-%S).log" | |
REPO_URL="https://github.com/readyName/nockchain.git" | |
PROJECT_DIR="nockchain" | |
WALLET_FILE="./target/wallet_keys.txt" | |
WALLET_CMD="./target/release/nockchain-wallet" | |
ENV_FILE=".env" |
NewerOlder