#!/bin/bash
set -euo pipefail
# Download into a NEW directory; existing files are not overwritten.
mkdir ddPlayer-VLCKit-download
cd ddPlayer-VLCKit-download
base=https://ddplayer.app/open-source/vlc
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part001" "$base/ddPlayer-VLCKit-source.tar.gz.part001"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part002" "$base/ddPlayer-VLCKit-source.tar.gz.part002"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part003" "$base/ddPlayer-VLCKit-source.tar.gz.part003"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part004" "$base/ddPlayer-VLCKit-source.tar.gz.part004"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part005" "$base/ddPlayer-VLCKit-source.tar.gz.part005"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part006" "$base/ddPlayer-VLCKit-source.tar.gz.part006"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part007" "$base/ddPlayer-VLCKit-source.tar.gz.part007"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part008" "$base/ddPlayer-VLCKit-source.tar.gz.part008"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part009" "$base/ddPlayer-VLCKit-source.tar.gz.part009"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part010" "$base/ddPlayer-VLCKit-source.tar.gz.part010"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part011" "$base/ddPlayer-VLCKit-source.tar.gz.part011"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part012" "$base/ddPlayer-VLCKit-source.tar.gz.part012"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part013" "$base/ddPlayer-VLCKit-source.tar.gz.part013"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part014" "$base/ddPlayer-VLCKit-source.tar.gz.part014"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part015" "$base/ddPlayer-VLCKit-source.tar.gz.part015"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part016" "$base/ddPlayer-VLCKit-source.tar.gz.part016"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part017" "$base/ddPlayer-VLCKit-source.tar.gz.part017"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part018" "$base/ddPlayer-VLCKit-source.tar.gz.part018"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part019" "$base/ddPlayer-VLCKit-source.tar.gz.part019"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part020" "$base/ddPlayer-VLCKit-source.tar.gz.part020"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part021" "$base/ddPlayer-VLCKit-source.tar.gz.part021"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part022" "$base/ddPlayer-VLCKit-source.tar.gz.part022"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part023" "$base/ddPlayer-VLCKit-source.tar.gz.part023"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part024" "$base/ddPlayer-VLCKit-source.tar.gz.part024"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part025" "$base/ddPlayer-VLCKit-source.tar.gz.part025"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part026" "$base/ddPlayer-VLCKit-source.tar.gz.part026"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part027" "$base/ddPlayer-VLCKit-source.tar.gz.part027"
curl --fail --location --retry 3 --output "ddPlayer-VLCKit-source.tar.gz.part028" "$base/ddPlayer-VLCKit-source.tar.gz.part028"
curl --fail --location --retry 3 --output "PARTS-SHA256SUMS" "$base/PARTS-SHA256SUMS"
curl --fail --location --retry 3 --output "SHA256SUMS" "$base/SHA256SUMS"
shasum -a 256 -c PARTS-SHA256SUMS
cat ddPlayer-VLCKit-source.tar.gz.part* > ddPlayer-VLCKit-source.tar.gz
shasum -a 256 -c SHA256SUMS
# Extraction only; no upstream source or build script is executed.
tar -xzf ddPlayer-VLCKit-source.tar.gz
