#!/bin/bash

read -p "请输入 Clash Party 版本号 (例如 1.8.6): " VERSION

mkdir -p "$VERSION"
cd "$VERSION" || exit

BASE_URL="https://github.com/mihomo-party-org/clash-party/releases/download/v$VERSION"

FILES=(
  "clash-party-windows-${VERSION}-x64-setup.exe"
  "clash-party-windows-${VERSION}-x64-portable.7z"
  "clash-party-win7-${VERSION}-x64-setup.exe"
  "clash-party-win7-${VERSION}-x64-portable.7z"
  "clash-party-macos-${VERSION}-x64.pkg"
  "clash-party-catalina-${VERSION}-x64.pkg"
  "clash-party-linux-${VERSION}-amd64.deb"
  "clash-party-linux-${VERSION}-x86_64.rpm"
)

for f in "${FILES[@]}"; do
  echo "开始下载: $f"
  aria2c -x 8 -s 8 -k 1M "${BASE_URL}/${f}"
done

