mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 10:58:51 +00:00
Update cutter-deps to v15 with macOS/arm64 included (#2990)
This commit is contained in:
parent
2529196df0
commit
a6dca2956d
@ -1,54 +1,55 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
cd $(dirname "${BASH_SOURCE[0]}")/..
|
cd $(dirname "${BASH_SOURCE[0]}")/..
|
||||||
mkdir -p cutter-deps && cd cutter-deps
|
mkdir -p cutter-deps && cd cutter-deps
|
||||||
|
|
||||||
LINUX_FILE="cutter-deps-linux.tar.gz"
|
DEPS_FILE_linux_x86_64=cutter-deps-linux-x86_64.tar.gz
|
||||||
LINUX_MD5=eb2710548d951823e6b5340c33c8fc99
|
DEPS_SHA256_linux_x86_64=0721c85548bbcf31f6911cdb2227e5efb4a20c34262672d4cd2193db166b2f8c
|
||||||
LINUX_URL=https://github.com/rizinorg/cutter-deps/releases/download/v14/cutter-deps-linux.tar.gz
|
|
||||||
|
|
||||||
MACOS_FILE="cutter-deps-macos.tar.gz"
|
DEPS_FILE_macos_x86_64=cutter-deps-macos-x86_64.tar.gz
|
||||||
MACOS_MD5=f921c007430eec38b06acef8cc0fe42a
|
DEPS_SHA256_macos_x86_64=0a23fdec3012a8af76675d6f3ff39cf9df9b08c13d1156fb7ffcc0e495c9407f
|
||||||
MACOS_URL=https://github.com/rizinorg/cutter-deps/releases/download/v14/cutter-deps-macos.tar.gz
|
|
||||||
|
|
||||||
WIN_FILE="cutter-deps-win.tar.gz"
|
DEPS_FILE_macos_arm64=cutter-deps-macos-arm64.tar.gz
|
||||||
WIN_MD5=09aa544e62cdd786df3598f1ff340f9e
|
DEPS_SHA256_macos_arm64=f9b9a5569bd23c9b5e45836b82aba7576a5c53df4871380a55c370b9d7f88615
|
||||||
WIN_URL=https://github.com/rizinorg/cutter-deps/releases/download/v14/cutter-deps-win.tar.gz
|
|
||||||
|
|
||||||
|
DEPS_FILE_win_x86_64=cutter-deps-win-x86_64.tar.gz
|
||||||
|
DEPS_SHA256_win_x86_64=9ab4e89732a3df0859a26fd5de6d9f3cb80106cbe2539340af831ed298625076
|
||||||
|
|
||||||
|
DEPS_BASE_URL=https://github.com/rizinorg/cutter-deps/releases/download/v15
|
||||||
|
|
||||||
|
ARCH=x86_64
|
||||||
if [ "$OS" == "Windows_NT" ]; then
|
if [ "$OS" == "Windows_NT" ]; then
|
||||||
FILE="${WIN_FILE}"
|
PLATFORM=win
|
||||||
MD5="${WIN_MD5}"
|
|
||||||
URL="${WIN_URL}"
|
|
||||||
else
|
else
|
||||||
UNAME_S="$(uname -s)"
|
UNAME_S="$(uname -s)"
|
||||||
if [ "$UNAME_S" == "Linux" ]; then
|
if [ "$UNAME_S" == "Linux" ]; then
|
||||||
FILE="${LINUX_FILE}"
|
PLATFORM=linux
|
||||||
MD5="${LINUX_MD5}"
|
|
||||||
URL="${LINUX_URL}"
|
|
||||||
elif [ "$UNAME_S" == "Darwin" ]; then
|
elif [ "$UNAME_S" == "Darwin" ]; then
|
||||||
FILE="${MACOS_FILE}"
|
PLATFORM=macos
|
||||||
MD5="${MACOS_MD5}"
|
ARCH=$(uname -m)
|
||||||
URL="${MACOS_URL}"
|
|
||||||
else
|
else
|
||||||
echo "Unsupported Platform: uname -s => $UNAME_S, \$OS => $OS"
|
echo "Unsupported Platform: uname -s => $UNAME_S, \$OS => $OS"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -L "$URL" -o "$FILE" || exit 1
|
DEPS_FILE=DEPS_FILE_${PLATFORM}_${ARCH}
|
||||||
|
DEPS_FILE=${!DEPS_FILE}
|
||||||
|
DEPS_SHA256=DEPS_SHA256_${PLATFORM}_${ARCH}
|
||||||
|
DEPS_SHA256=${!DEPS_SHA256}
|
||||||
|
DEPS_URL=${DEPS_BASE_URL}/${DEPS_FILE}
|
||||||
|
|
||||||
if [ "$UNAME_S" == "Darwin" ]; then
|
SHA256SUM=sha256sum
|
||||||
if [ "$(md5 -r "$FILE")" != "$MD5 $FILE" ]; then \
|
if ! command -v ${SHA256SUM} &> /dev/null; then
|
||||||
echo "MD5 mismatch for file $FILE"; \
|
SHA256SUM="shasum -a 256"
|
||||||
exit 1; \
|
|
||||||
else \
|
|
||||||
echo "$FILE OK"; \
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$MD5 $FILE" | md5sum -c - || exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tar -xf "$FILE" || exit 1
|
curl -L "$DEPS_URL" -o "$DEPS_FILE" || exit 1
|
||||||
|
echo "$DEPS_SHA256 $DEPS_FILE" | ${SHA256SUM} -c - || exit 1
|
||||||
|
|
||||||
|
tar -xf "$DEPS_FILE" || exit 1
|
||||||
|
|
||||||
if [ -f relocate.sh ]; then
|
if [ -f relocate.sh ]; then
|
||||||
./relocate.sh || exit 1
|
./relocate.sh || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user