File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ LIB_ROOT=../..
5+ REPO=" cypherstack/flutter_libmwc"
6+ BASE_URL=" https://github.com/${REPO} /releases/download"
7+
8+ TAG=$( git -C " $LIB_ROOT " describe --tags --exact-match HEAD 2> /dev/null) || {
9+ echo " Error: flutter_libmwc is not at a tagged commit."
10+ echo " Pin the submodule to a release tag to use download mode."
11+ echo " Current commit: $( git -C " $LIB_ROOT " rev-parse HEAD) "
12+ exit 1
13+ }
14+
15+ TMPDIR=$( mktemp -d)
16+ trap ' rm -rf "$TMPDIR"' EXIT
17+
18+ curl -fSL " ${BASE_URL} /${TAG} /checksums.txt" -o " $TMPDIR /checksums.txt"
19+
20+ download_and_verify () {
21+ local asset=" $1 "
22+ curl -fSL " ${BASE_URL} /${TAG} /${asset} " -o " $TMPDIR /${asset} "
23+ grep " ^[0-9a-f]* ${asset} $" " $TMPDIR /checksums.txt" | (cd " $TMPDIR " && shasum -a 256 -c)
24+ }
25+
26+ download_and_verify " MWCWallet.xcframework.zip"
27+
28+ mkdir -p " $LIB_ROOT /macos/framework"
29+ rm -rf " $LIB_ROOT /macos/framework/MWCWallet.xcframework"
30+ unzip -q " $TMPDIR /MWCWallet.xcframework.zip" -d " $TMPDIR /xcfw"
31+ cp -r " $TMPDIR /xcfw/MWCWallet.xcframework" " $LIB_ROOT /macos/framework/MWCWallet.xcframework"
You can’t perform that action at this time.
0 commit comments