by default do not work in the current direktory
[summon-arm-toolchain.git] / summon-arm-toolchain
index e5359335ec5adbfa3e34d3157ecedb6d8b126c56..3c43ef4f336020ef08a6de9fe2f995e8eac88be3 100755 (executable)
@@ -14,16 +14,17 @@ set -e
 # You probably want to customize those
 ##############################################################################
 TARGET=arm-eabi                # Or: TARGET=arm-elf
-PREFIX=${HOME}/arm     # Install location of your final toolchain
+[ -z $PREFIX ] && PREFIX=${HOME}/arm   # Install location of your final toolchain
+[ -z $WORKDIR ] && WORKDIR=$PREFIX/work     #temporary directory
 PARALLEL=                      # Or: PARALLEL="-j 5" for 4 CPUs
 # Set to 'sudo' if you need superuser privileges while installing
 SUDO=''
 # Set to 1 to be quieter while running
-QUIET=1
+QUIET=0
 # Set to 1 to use linaro gcc instead of the FSF gcc
 USE_LINARO=1
 # Set to 1 to enable building of OpenOCD
-OOCD_EN=1
+OOCD_EN=0
 # Set to 1 to build libstm32 provided by ST
 LIBSTM32_EN=0
 # Set to 1 to build libopenstm32 an open source library for stm32
@@ -95,7 +96,7 @@ fi
 
 export PATH="${PREFIX}/bin:${PATH}"
 
-SUMMON_DIR=$(pwd)
+SUMMON_DIR=${WORKDIR}
 SOURCES=${SUMMON_DIR}/sources
 STAMPS=${SUMMON_DIR}/stamps
 
@@ -266,6 +267,7 @@ if [ ! -e libopenstm32-${LIBOPENSTM32}.tar.bz2 ]; then
 fi
 fi
 
+mkdir -p ${SUMMON_DIR}
 cd ${SUMMON_DIR}
 
 if [ ! -e build ]; then