Skip to content

Commit

Permalink
Fix toolchain name
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartatz committed Sep 1, 2023
1 parent 0e7aead commit e924e01
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tools/setup_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

set -eu

declare -r RAIDEN_HOME='/tmp/raiden-toolchain'
declare -r NERO_HOME='/tmp/nero-toolchain'

if [ -d "${RAIDEN_HOME}" ]; then
PATH+=":${RAIDEN_HOME}/bin"
export RAIDEN_HOME \
if [ -d "${NERO_HOME}" ]; then
PATH+=":${NERO_HOME}/bin"
export NERO_HOME \
PATH
return 0
fi

declare -r RAIDEN_CROSS_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --retry 10 --retry-delay 3 --silent --url 'https://api.github.com/repos/AmanoTeam/Raiden/releases/latest')")"
declare -r RAIDEN_CROSS_TARBALL='/tmp/raiden.tar.xz'
declare -r RAIDEN_CROSS_URL="https://github.com/AmanoTeam/Raiden/releases/download/${RAIDEN_CROSS_TAG}/x86_64-unknown-linux-gnu.tar.xz"
declare -r NERO_CROSS_TAG="$(jq --raw-output '.tag_name' <<< "$(curl --retry 10 --retry-delay 3 --silent --url 'https://api.github.com/repos/AmanoTeam/Nero/releases/latest')")"
declare -r NERO_CROSS_TARBALL='/tmp/nero.tar.xz'
declare -r NERO_CROSS_URL="https://github.com/AmanoTeam/Nero/releases/download/${NERO_CROSS_TAG}/x86_64-unknown-linux-gnu.tar.xz"

curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${RAIDEN_CROSS_URL}" --output "${RAIDEN_CROSS_TARBALL}"
tar --directory="$(dirname "${RAIDEN_CROSS_TARBALL}")" --extract --file="${RAIDEN_CROSS_TARBALL}"
curl --connect-timeout '10' --retry '15' --retry-all-errors --fail --silent --location --url "${NERO_CROSS_URL}" --output "${NERO_CROSS_TARBALL}"
tar --directory="$(dirname "${NERO_CROSS_TARBALL}")" --extract --file="${NERO_CROSS_TARBALL}"

rm "${RAIDEN_CROSS_TARBALL}"
rm "${NERO_CROSS_TARBALL}"

mv '/tmp/raiden' "${RAIDEN_HOME}"
mv '/tmp/nero' "${NERO_HOME}"

PATH+=":${RAIDEN_HOME}/bin"
PATH+=":${NERO_HOME}/bin"

export RAIDEN_HOME \
export NERO_HOME \
PATH

0 comments on commit e924e01

Please sign in to comment.