ctf-tools/cross2/install
Steven Van Acker 7144e756e5 fail hard on any error + verify that all scripts use bash -ex to fail
early on any error + anticipate that some tools can't be installed by
now, but we still want the test to return success to satisfy travis-ci
2017-02-16 22:40:17 +01:00

26 lines
472 B
Bash
Executable file

#!/bin/bash -ex
FILE=cross2-20130826.tgz
INSTALL_DIR=$PWD
[ ! -e $FILE ] && wget http://kozos.jp/books/asm/$FILE
tar xf $FILE
cd cross2/toolchain
./fetch.sh
./setup.sh
cd ..
sed -i -e "s|#makeopt=.*|makeopt='-j'|" config.sh
sed -i -e "s|install_dir.*|install_dir=\"$INSTALL_DIR\"|" config.sh
cd build
./build-install-all.sh
mkdir -p bin
cd bin
for i in ../*/bin/*
do
F=$(basename $i)
D=$(basename $(dirname $(dirname $i)))
[ -f $D-$F ] || ln -s $i $D-$F
done
cd ..