Skip to content

Commit

Permalink
Update toolchain install script
Browse files Browse the repository at this point in the history
Output the toolchain source and current version
  • Loading branch information
devanlai committed Feb 28, 2018
1 parent 6b5aa9e commit 226df12
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions util/install-toolchain.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#!/bin/bash
set -eo pipefail
URL=https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2
TOOLCHAIN=gcc-arm-none-eabi-5_2-2015q4
if [[ ! -d "$HOME/toolchains/gcc-arm-embedded" ]]; then
mkdir -p ~/toolchains
wget -qO- $URL | tar xj -C ~/toolchains/
ln -s $TOOLCHAIN ~/toolchains/gcc-arm-embedded
TOOLCHAINS=$HOME/toolchains
if [[ ! -d "${TOOLCHAINS}/gcc-arm-embedded" ]]; then
echo "Installing $TOOLCHAIN from $URL to ${TOOLCHAINS}"
mkdir -p ${TOOLCHAINS}
wget -qO- $URL | tar xj -C ${TOOLCHAINS}
ln -s $TOOLCHAIN ${TOOLCHAINS}/gcc-arm-embedded
fi;

EXISTING_TOOLCHAIN=`readlink -f "${TOOLCHAINS}/gcc-arm-embedded"`
echo "Current toolchain is $EXISTING_TOOLCHAIN"

TOOLCHAIN_VER=`${TOOLCHAINS}/gcc-arm-embedded/bin/arm-none-eabi-gcc --version | head -n 1`
echo "Installed toolchain version is $TOOLCHAIN_VER"

0 comments on commit 226df12

Please sign in to comment.