Refactored tools structure & conventions for reuse (#685)
1. All common tools are hosted and managed in
the tools directory (used for both local development
and continuous integration)
2. Each tool comprises a directory, akin to a bundle,
that encapsulates declarative command-line options,
configuration files and a run script
3. A single bootstrap script configures a
development environment
4. A lightweight runtime provides a common set of
convenience functions and variables to all scripts
References #672
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user