Files
MySensors/.mystools/cppcheck/run.sh
T
Bruce Lacey 7e1aa82d6e Rename .tools to .mystools for Arduino IDE 2 (#688)
* The Arduino IDE considers the .tools directory
 special and warns if it finds .tools the repo
 * Added detection of .tools directory rename
 * Corrected README errata

References #672
2016-12-11 13:49:32 -08:00

20 lines
448 B
Bash
Executable File

#!/bin/bash
# Instantiate the tool runtime shim
. "$(git mystoolspath).bundle_runtime.sh"
# cppcheck takes one or more files as an argument.
# --cached or <no arg> for changed
if [[ $# = 0 ]]; then
for file in $(modifiedSourceFiles); do
runBundle $file
done
elif [[ $1 = '--cached' ]]; then
for file in $(stagedSourceFiles); do
runBundle $file
done
else
eval "set -- $(git rev-parse --sq --prefix "$GIT_PREFIX" "$@")"
runBundle "$@"
fi