1 #!/bin/sh 1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 2 # SPDX-License-Identifier: GPL-2.0 3 3 4 set -e 4 set -e 5 5 6 if [ $# != 1 ]; then << 7 echo "Usage: $0 <modules.order>" >& 2 << 8 exit 1 << 9 fi << 10 << 11 exit_code=0 << 12 << 13 # Check uniqueness of module names 6 # Check uniqueness of module names 14 check_same_name_modules() 7 check_same_name_modules() 15 { 8 { 16 for m in $(sed 's:.*/::' "$1" | sort | !! 9 for m in $(sed 's:.*/::' modules.order | sort | uniq -d) 17 do 10 do 18 echo "error: the following wou !! 11 echo "warning: same module names found:" >&2 19 sed -n "/\/$m/s:^\(.*\)\.o\$: !! 12 sed -n "/\/$m/s:^: :p" modules.order >&2 20 exit_code=1 << 21 done 13 done 22 } 14 } 23 15 24 check_same_name_modules "$1" !! 16 check_same_name_modules 25 << 26 exit $exit_code <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.