Files
stock-tool/install.sh
root f246f06cb1 Initial commit: 股票数据分析工具
- Go后端服务
- 内置Web界面
- SQLite数据库
- 股票列表展示
- K线图绘制
- 技术指标计算
- 基本面数据展示
2026-02-19 03:07:02 +08:00

38 lines
704 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
echo "📦 开始安装股票分析工具..."
# 检查 Go 是否安装
if ! command -v go &> /dev/null; then
echo "❌ 未检测到 Go请先安装 Go 1.21+"
echo "下载地址: https://go.dev/dl/"
exit 1
fi
echo "✅ Go 版本: $(go version)"
# 进入项目目录
cd "$(dirname "$0")"
# 下载依赖
echo "📥 下载 Go 依赖..."
go mod download
# 编译程序
echo "🔨 编译程序..."
go build -o stock-tool main.go
# 创建数据目录
mkdir -p data
echo "✅ 安装完成!"
echo ""
echo "📋 运行程序:"
echo " ./stock-tool"
echo ""
echo "📋 或者直接运行:"
echo " go run main.go"
echo ""
echo "🌐 访问网页:"
echo " http://localhost:8080"