soc/amd/common/blocks/include: rename gpio_banks.h to gpio.h
[coreboot.git] / util / lint / lint-stable-018-symlinks
blobcd5c8440c1e99ab74e4b46e2b1238bd370539e7f
1 #!/usr/bin/env sh
3 # SPDX-License-Identifier: GPL-2.0-only
5 # DESCR: Report any symbolic links
7 LC_ALL=C export LC_ALL
9 EXCLUDED_DIRS='^3rdparty\|^site-local'
11 # If the code is in a git repo, only print files that are checked in
12 if [ -n "$(command -v git)" ] && \
13 [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]
14 then
15 git ls-tree -r HEAD | \
16 grep ^120000 | \
17 cut -f2 | \
18 grep -v "$EXCLUDED_DIRS"
19 else
20 # If the code isn't in a git repo, print everything
21 find . -type l | \
22 sed 's|\.\/||' | \
23 grep -v "$EXCLUDED_DIRS"