Hugo L'Hostis | 8c7cb64 | 2021-04-22 12:12:05 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | #------------------------------------------------------------------------------- |
| 3 | # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | #------------------------------------------------------------------------------- |
| 8 | |
| 9 | set -e |
| 10 | |
| 11 | if [ "$EUID" -ne 0 ] |
| 12 | then echo "Please run as root" |
| 13 | exit |
| 14 | else |
| 15 | wget -q https://github.com/danmar/cppcheck/archive/refs/tags/2.3.tar.gz -O /tmp/cppcheck.tar.gz |
| 16 | tar -xf /tmp/cppcheck.tar.gz -C /tmp |
| 17 | cd /tmp/cppcheck-* |
| 18 | make FILESDIR=/usr/share/cppcheck install |
| 19 | fi |
| 20 | |