install_vcpkg_dependencies.sh 623 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. ACCOUNT="vcmi"
  3. # Fetch latest release tag from GitHub API
  4. # RELEASE_TAG=$(curl -s "https://api.github.com/repos/$ACCOUNT/vcmi-deps-windows/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
  5. RELEASE_TAG="v1.9"
  6. DEP_FILENAME="dependencies-$1"
  7. DEP_URL="https://github.com/$ACCOUNT/vcmi-deps-windows/releases/download/$RELEASE_TAG/$DEP_FILENAME.txz"
  8. curl -L "$DEP_URL" | tar -xf - --xz
  9. UCRT_FILENAME="ucrtRedist-$1"
  10. UCRT_URL="https://github.com/$ACCOUNT/vcmi-deps-windows/releases/download/$RELEASE_TAG/$UCRT_FILENAME.txz"
  11. mkdir -p ucrt
  12. curl -L "$UCRT_URL" | tar -xf - --xz -C ucrt