Skip to content

Commit 3ef92aa

Browse files
committed
external_deps: add download action to download and extract the external deps tarball like CMake
1 parent 710f53b commit 3ef92aa

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

external_deps/build.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,34 @@ build_wipe() {
12911291
rm -rf "${BUILD_BASEDIR}/" "${PKG_BASEDIR}/" "${PKG_BASEDIR}.tar.xz"
12921292
}
12931293

1294+
build_download() {
1295+
local dir="${PLATFORM}_${DEPS_VERSION}"
1296+
local tarball="${dir}.tar.xz"
1297+
1298+
local upstreams=(
1299+
'https://dl.unvanquished.net/deps'
1300+
'https://dl.unvanquished.net/test/deps'
1301+
)
1302+
1303+
local mirrors=()
1304+
for upstream in "${upstreams[@]}"
1305+
do
1306+
mirrors+=("${upstream}/${tarball}")
1307+
done
1308+
1309+
download "${tarball}" "${mirrors[@]}"
1310+
1311+
"${download_only}" && return
1312+
1313+
rm -rf "${dir}"
1314+
1315+
extract "${tarball}" 'download_deps'
1316+
mv "${dir}" ..
1317+
1318+
cd ..
1319+
rmdir 'download_deps'
1320+
}
1321+
12941322
# Common setup code
12951323
common_setup() {
12961324
HOST="${2}"
@@ -1506,6 +1534,8 @@ printHelp() {
15061534
install create a stripped down version of the built packages that CMake can use
15071535
package create a tarball of the dependencies so they can be distributed
15081536
wipe remove products of build process, excepting download cache but INCLUDING installed files. Must be last
1537+
download
1538+
download and extractthe prebuilt tarball like CMake does
15091539
15101540
Packages required for each platform:
15111541

0 commit comments

Comments
 (0)