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 6 if [ $# != 1 ]; then 7 echo "Usage: $0 <modules.order>" >& 2 7 echo "Usage: $0 <modules.order>" >& 2 8 exit 1 8 exit 1 9 fi 9 fi 10 10 11 exit_code=0 11 exit_code=0 12 12 13 # Check uniqueness of module names 13 # Check uniqueness of module names 14 check_same_name_modules() 14 check_same_name_modules() 15 { 15 { 16 for m in $(sed 's:.*/::' "$1" | sort | !! 16 for m in $(sed 's:.*/::' $1 | sort | uniq -d) 17 do 17 do 18 echo "error: the following wou 18 echo "error: the following would cause module name conflict:" >&2 19 sed -n "/\/$m/s:^\(.*\)\.o\$: !! 19 sed -n "/\/$m/s:^: :p" modules.order >&2 20 exit_code=1 20 exit_code=1 21 done 21 done 22 } 22 } 23 23 24 check_same_name_modules "$1" 24 check_same_name_modules "$1" 25 25 26 exit $exit_code 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.