ctf-tools/cross2/install

27 lines
472 B
Text
Raw Normal View History

#!/bin/bash -ex
FILE=cross2-20130826.tgz
INSTALL_DIR=$PWD
[ ! -e $FILE ] && wget http://kozos.jp/books/asm/$FILE
2016-02-04 22:33:05 +00:00
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
2016-02-04 22:33:05 +00:00
./build-install-all.sh
2016-02-04 22:30:18 +00:00
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 ..