summaryrefslogtreecommitdiffstats
path: root/scripts/modules-check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/modules-check.sh')
-rwxr-xr-xscripts/modules-check.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/modules-check.sh b/scripts/modules-check.sh
new file mode 100755
index 000000000000..2f659530e1ec
--- /dev/null
+++ b/scripts/modules-check.sh
@@ -0,0 +1,16 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4set -e
5
6# Check uniqueness of module names
7check_same_name_modules()
8{
9 for m in $(sed 's:.*/::' modules.order modules.builtin | sort | uniq -d)
10 do
11 echo "warning: same basename if the following are built as modules:" >&2
12 sed "/\/$m/!d;s:^kernel/: :" modules.order modules.builtin >&2
13 done
14}
15
16check_same_name_modules