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-10-01 21:45:56 +0100 |
| commit | eb1c8cd1d938cb4d1bf44c525cea1eafb52cdb96 (patch) | |
| tree | 01fb2e92f6e45c49aedbad57ff64f35d104218a7 /scripts/contrib/build-perf-test-wrapper.sh | |
| parent | a8002cb367c9acd61471d1e11e7b48db607f9298 (diff) | |
| download | poky-eb1c8cd1d938cb4d1bf44c525cea1eafb52cdb96.tar.gz | |
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.
(From OE-Core rev: 4725ee8e4e4837446dfa3a319eb68cc9572c55eb)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/build-perf-test-wrapper.sh')
| -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 | |||
| 57 | esac | 57 | esac |
| 58 | done | 58 | done |
| 59 | 59 | ||
| 60 | # Check positional args | ||
| 61 | shift "$((OPTIND - 1))" | ||
| 62 | if [ $# -ne 0 ]; then | ||
| 63 | echo "ERROR: No positional args are accepted." | ||
| 64 | usage | ||
| 65 | exit 1 | ||
| 66 | fi | ||
| 67 | |||
| 60 | echo "Running on `uname -n`" | 68 | echo "Running on `uname -n`" |
| 61 | if ! git_topdir=$(git rev-parse --show-toplevel); then | 69 | if ! git_topdir=$(git rev-parse --show-toplevel); then |
| 62 | echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`" | 70 | echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`" |
