mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 22:36:00 +00:00
fix(build): mirror pinned talloc downloads
This commit is contained in:
1 parent
9a8f54dee7
commit
40b7c480a3
1 file changed
+14
-5
+14
-5
@@ -23,13 +23,22 @@ fi
|
|||||||
WORK=$(mktemp -d)
|
WORK=$(mktemp -d)
|
||||||
trap 'rm -rf "$WORK"' EXIT
|
trap 'rm -rf "$WORK"' EXIT
|
||||||
fetch() {
|
fetch() {
|
||||||
curl -fsSL --retry 3 -o "$WORK/$1" "$2"
|
local name=$1 primary=$2 sha=$3 url fetched=0
|
||||||
echo "$3 $WORK/$1" | shasum -a 256 -c -
|
shift 3
|
||||||
mkdir -p "$WORK/${1%%.*}"
|
for url in "$primary" "$@"; do
|
||||||
tar -xzf "$WORK/$1" -C "$WORK/${1%%.*}" --strip-components=1
|
if curl -fsSL --connect-timeout 15 --max-time 90 --retry 3 --retry-max-time 120 -o "$WORK/$name" "$url" &&
|
||||||
|
printf '%s %s\n' "$sha" "$WORK/$name" | shasum -a 256 -c -; then
|
||||||
|
fetched=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[[ $fetched == 1 ]] || return 1
|
||||||
|
mkdir -p "$WORK/${name%%.*}"
|
||||||
|
tar -xzf "$WORK/$name" -C "$WORK/${name%%.*}" --strip-components=1
|
||||||
}
|
}
|
||||||
fetch proot.tar.gz "https://github.com/termux/proot/archive/${PROOT_COMMIT}.tar.gz" "$PROOT_SHA256"
|
fetch proot.tar.gz "https://github.com/termux/proot/archive/${PROOT_COMMIT}.tar.gz" "$PROOT_SHA256"
|
||||||
fetch talloc.tar.gz "https://www.samba.org/ftp/talloc/talloc-${TALLOC_VERSION}.tar.gz" "$TALLOC_SHA256"
|
fetch talloc.tar.gz "https://www.samba.org/ftp/talloc/talloc-${TALLOC_VERSION}.tar.gz" "$TALLOC_SHA256" \
|
||||||
|
"https://distfiles.macports.org/talloc/talloc-${TALLOC_VERSION}.tar.gz"
|
||||||
cp "$HERE/statx_mnt_id.h" "$WORK/proot/src/tracee/statx_mnt_id.h"
|
cp "$HERE/statx_mnt_id.h" "$WORK/proot/src/tracee/statx_mnt_id.h"
|
||||||
cp "$HERE/profile.h" "$WORK/proot/src/syscall/profile.h"
|
cp "$HERE/profile.h" "$WORK/proot/src/syscall/profile.h"
|
||||||
for patch in "$HERE"/patches/*.patch; do
|
for patch in "$HERE"/patches/*.patch; do
|
||||||
|
|||||||
Reference in new issue
Block a user