diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-09-29 20:10:08 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-30 17:14:12 +0100 |
commit | 4725ee8e4e4837446dfa3a319eb68cc9572c55eb (patch) | |
tree | 64c5af26ad5c7f27c903975aba4846f1af5c4521 /scripts/contrib | |
parent | 072dd5b3b164ca7a5fd9dc969c991c15adeb0cbe (diff) | |
download | openembedded-core-4725ee8e4e4837446dfa3a319eb68cc9572c55eb.tar.gz openembedded-core-4725ee8e4e4837446dfa3a319eb68cc9572c55eb.tar.bz2 openembedded-core-4725ee8e4e4837446dfa3a319eb68cc9572c55eb.zip |
build-perf-test-wrapper.sh: check for positional arguments
Stricter checking of command line arguments. The script doesn't use any
positional arguments so don't accept any and error out if those are
found.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-x | scripts/contrib/build-perf-test-wrapper.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh index d61e438933..90dd545495 100755 --- a/scripts/contrib/build-perf-test-wrapper.sh +++ b/scripts/contrib/build-perf-test-wrapper.sh @@ -57,6 +57,14 @@ while getopts "ha:c:C:w:" opt; do esac done +# Check positional args +shift "$((OPTIND - 1))" +if [ $# -ne 0 ]; then + echo "ERROR: No positional args are accepted." + usage + exit 1 +fi + echo "Running on `uname -n`" if ! git_topdir=$(git rev-parse --show-toplevel); then echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`" |