1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 06:53:52 +01:00

dist/cppcheck: handle unhandled condition

When no arguments are given at all, the script would shift when there
is nothing to shift. This results in a failure on debian stable:
```
./dist/tools/cppcheck/check.sh: 20: shift: can't shift that many
```
This commit is contained in:
Ludwig Ortmann 2014-11-21 18:43:26 +01:00
parent b4c3a06a8e
commit e343f114f4

View File

@ -17,7 +17,9 @@ FILEREGEX='\.([sScHh]|cpp)$'
if echo "${BRANCH}" | grep -q '^-'; then
BRANCH=""
else
shift 1
if [ -n "${BRANCH}" ]; then
shift 1
fi
fi
# If the --diff-filter option is given, consume this parameter.