blob: 060b470f8c1446518f63fbde733ef7b43da9a41d [file] [log] [blame]
Martin Roth0ad5fbd2020-12-24 12:06:38 -07001#!/usr/bin/env sh
Martin Rothadcba942016-11-28 13:16:24 -07002#
Patrick Georgi7333a112020-05-08 20:48:04 +02003# SPDX-License-Identifier: GPL-2.0-only
4
Martin Rothadcba942016-11-28 13:16:24 -07005# DESCR: Report any symbolic links
6
Martin Rothd81debd2022-06-03 00:06:57 -06007LINTDIR="$(
8 cd -- "$(dirname "$0")" > /dev/null 2>&1 || return
9 pwd -P
10)"
11
12# shellcheck source=helper_functions.sh
13. "${LINTDIR}/helper_functions.sh"
Martin Rothadcba942016-11-28 13:16:24 -070014
15EXCLUDED_DIRS='^3rdparty\|^site-local'
16
Martin Rothd81debd2022-06-03 00:06:57 -060017# Exit if the code isn't in a git repo
18if [ "${IN_GIT_TREE}" -eq 0 ]; then
19 exit 0
Martin Rothadcba942016-11-28 13:16:24 -070020fi
Martin Rothd81debd2022-06-03 00:06:57 -060021
22
23${GIT} ls-tree -r HEAD | \
24 grep ^120000 | \
25 cut -f2 | \
26 grep -v "$EXCLUDED_DIRS"