#!/bin/bash -e FILE=cross2-20130826.tgz INSTALL_DIR=$PWD [ ! -e $FILE ] && wget http://kozos.jp/books/asm/$FILE tar xvf $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-clean-all.sh