comparison LoadFile/winload.teensy @ 281:71882cd1c362

Check for needed programs Check for dfu-util and screen before using them. Also aborts if teensy_loader_cli compilation fails. Uses the type builtin to determine if a command exists. See here: https://gist.github.com/sdelmas/7377271
author Rowan Decker <Smasher816@gmail.com>
date Thu, 12 Feb 2015 19:42:01 -0800
parents 2a3468f5d8be
children 99f93dec8fea
comparison
equal deleted inserted replaced
280:18b61e53753c 281:71882cd1c362
47 if [ ! -e teensy-loader-cli/teensy-loader-cli ]; then 47 if [ ! -e teensy-loader-cli/teensy-loader-cli ]; then
48 # Compile teensy-loader-cli 48 # Compile teensy-loader-cli
49 mkdir -p teensy-loader-cli 49 mkdir -p teensy-loader-cli
50 cd teensy-loader-cli 50 cd teensy-loader-cli
51 cmake -G "Unix Makefiles" $(cygpath -u @CMAKE_SOURCE_DIR@/LoadFile) 51 cmake -G "Unix Makefiles" $(cygpath -u @CMAKE_SOURCE_DIR@/LoadFile)
52 make 52 make || exit 3
53 cd - 53 cd -
54 fi 54 fi
55 55
56 # If a SERIAL_PORT was specified set the uC into reflash mode 56 # If a SERIAL_PORT was specified set the uC into reflash mode
57 # XXX May not be successful if uC is not in a good state (or does not allow remote flashing) 57 # XXX May not be successful if uC is not in a good state (or does not allow remote flashing)