2019-02-28 13:56:54 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd $(dirname "${BASH_SOURCE[0]}")/..
|
|
|
|
mkdir -p cutter-deps && cd cutter-deps
|
|
|
|
|
2019-03-08 23:01:24 +00:00
|
|
|
LINUX_FILE="cutter-deps-linux.tar.gz"
|
2020-08-30 20:23:41 +00:00
|
|
|
LINUX_MD5=31fd19443a3405d6b6097cbbd4c11fba
|
|
|
|
LINUX_URL=https://github.com/radareorg/cutter-deps/releases/download/v12/cutter-deps-linux.tar.gz
|
2019-03-08 23:01:24 +00:00
|
|
|
|
|
|
|
MACOS_FILE="cutter-deps-macos.tar.gz"
|
2020-08-30 20:23:41 +00:00
|
|
|
MACOS_MD5=e75041c04fc806437723a399028402af
|
|
|
|
MACOS_URL=https://github.com/radareorg/cutter-deps/releases/download/v12/cutter-deps-macos.tar.gz
|
2019-03-16 10:35:31 +00:00
|
|
|
|
|
|
|
WIN_FILE="cutter-deps-win.tar.gz"
|
2020-08-30 20:23:41 +00:00
|
|
|
WIN_MD5=7c755404140f2e9945bfc13d2e645bb1
|
|
|
|
WIN_URL=https://github.com/radareorg/cutter-deps/releases/download/v12/cutter-deps-win.tar.gz
|
2019-03-16 10:35:31 +00:00
|
|
|
|
|
|
|
if [ "$OS" == "Windows_NT" ]; then
|
|
|
|
FILE="${WIN_FILE}"
|
|
|
|
MD5="${WIN_MD5}"
|
|
|
|
URL="${WIN_URL}"
|
2019-03-08 23:01:24 +00:00
|
|
|
else
|
2019-03-16 10:35:31 +00:00
|
|
|
UNAME_S="$(uname -s)"
|
|
|
|
if [ "$UNAME_S" == "Linux" ]; then
|
|
|
|
FILE="${LINUX_FILE}"
|
|
|
|
MD5="${LINUX_MD5}"
|
|
|
|
URL="${LINUX_URL}"
|
|
|
|
elif [ "$UNAME_S" == "Darwin" ]; then
|
|
|
|
FILE="${MACOS_FILE}"
|
|
|
|
MD5="${MACOS_MD5}"
|
|
|
|
URL="${MACOS_URL}"
|
|
|
|
else
|
|
|
|
echo "Unsupported Platform: uname -s => $UNAME_S, \$OS => $OS"
|
|
|
|
exit 1
|
|
|
|
fi
|
2019-03-08 23:01:24 +00:00
|
|
|
fi
|
2019-02-28 13:56:54 +00:00
|
|
|
|
|
|
|
curl -L "$URL" -o "$FILE" || exit 1
|
2019-03-08 23:01:24 +00:00
|
|
|
|
|
|
|
if [ "$UNAME_S" == "Darwin" ]; then
|
|
|
|
if [ "$(md5 -r "$FILE")" != "$MD5 $FILE" ]; then \
|
|
|
|
echo "MD5 mismatch for file $FILE"; \
|
|
|
|
exit 1; \
|
|
|
|
else \
|
|
|
|
echo "$FILE OK"; \
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "$MD5 $FILE" | md5sum -c - || exit 1
|
|
|
|
fi
|
|
|
|
|
2019-02-28 13:56:54 +00:00
|
|
|
tar -xf "$FILE" || exit 1
|
2019-03-16 10:35:31 +00:00
|
|
|
|
|
|
|
if [ -f relocate.sh ]; then
|
|
|
|
./relocate.sh || exit 1
|
|
|
|
fi
|
2019-02-28 13:56:54 +00:00
|
|
|
|