Only load up our settings once in the beginning

pull/102/head
Jesse Vincent 8 years ago
parent 9b095067e0
commit 117bcf5a09

@ -53,8 +53,6 @@ find_sketch () {
} }
flash () { flash () {
. ${ROOT}/tools/settings.sh
if [ ! -e "${HEX_FILE_PATH}" ]; then if [ ! -e "${HEX_FILE_PATH}" ]; then
compile compile
fi fi
@ -67,9 +65,9 @@ flash () {
avrdude -q -q -p${MCU} -cavr109 -D -P ${DEVICE_PORT_BOOTLOADER} -b57600 "-Uflash:w:${HEX_FILE_PATH}:i" avrdude -q -q -p${MCU} -cavr109 -D -P ${DEVICE_PORT_BOOTLOADER} -b57600 "-Uflash:w:${HEX_FILE_PATH}:i"
} }
program () {
. ${ROOT}/tools/settings.sh
program () {
if [ ! -e "${HEX_FILE_PATH}" ]; then if [ ! -e "${HEX_FILE_PATH}" ]; then
compile compile
fi fi
@ -86,8 +84,6 @@ program () {
} }
hex_with_bootloader () { hex_with_bootloader () {
. ${ROOT}/tools/settings.sh
if [ ! -e "${HEX_FILE_PATH}" ]; then if [ ! -e "${HEX_FILE_PATH}" ]; then
compile compile
fi fi
@ -112,8 +108,6 @@ build () {
} }
compile () { compile () {
. ${ROOT}/tools/settings.sh
install -d "${OUTPUT_PATH}" install -d "${OUTPUT_PATH}"
echo "Building ${OUTPUT_DIR}/${SKETCH} (${LIB_VERSION}) ..." echo "Building ${OUTPUT_DIR}/${SKETCH} (${LIB_VERSION}) ..."
@ -174,8 +168,6 @@ build_all () {
} }
size () { size () {
. ${ROOT}/tools/settings.sh
if [ ! -e "${HEX_FILE_PATH}" ]; then if [ ! -e "${HEX_FILE_PATH}" ]; then
compile compile
fi fi
@ -186,8 +178,6 @@ size () {
} }
size_map () { size_map () {
. ${ROOT}/tools/settings.sh
if [ ! -e "${HEX_FILE_PATH}" ]; then if [ ! -e "${HEX_FILE_PATH}" ]; then
compile compile
fi fi
@ -196,7 +186,6 @@ size_map () {
} }
decompile () { decompile () {
. ${ROOT}/tools/settings.sh
if [ ! -e "${HEX_FILE_PATH}" ]; then if [ ! -e "${HEX_FILE_PATH}" ]; then
compile compile
@ -206,14 +195,10 @@ decompile () {
} }
clean () { clean () {
. ${ROOT}/tools/settings.sh
rm -rf "${OUTPUT_PATH}" rm -rf "${OUTPUT_PATH}"
} }
reset_device () { reset_device () {
. ${ROOT}/tools/settings.sh
${RESET_DEVICE} ${RESET_DEVICE}
} }
@ -285,6 +270,10 @@ if [ -e "${SOURCEDIR}/.keyboardio-builder.conf" ]; then
. "${SOURCEDIR}/.keyboardio-builder.conf" . "${SOURCEDIR}/.keyboardio-builder.conf"
fi fi
. ${ROOT}/tools/settings.sh
cmds="" cmds=""
## Export vars ## Export vars

Loading…
Cancel
Save