wok-6.x annotate linux/stuff/list_modules.sh @ rev 2255

Add squirrelmail-msg_flags
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 15 22:52:03 2009 +0000 (2009-02-15)
parents ff4745b2e54a
children b563b08e4f32
rev   line source
pascal@886 1 #!/bin/sh
pascal@886 2 # list_modules.sh: list Linux kernel modules for SliTaz GNU/Linux.
pascal@886 3 # 2008/06/07 <pascal.bellard@slitaz.org> - GNU General Public License.
pascal@886 4 #
pascal@886 5
pascal@886 6 if [ -z "$1" ] ; then
pascal@886 7 cat 1>&2 <<EOT
pascal@886 8
pascal@886 9 \033[1musage:\033[0m `basename $0` path/to/kernel-modules-subtrees
pascal@886 10 exemple `basename $0` drivers/net/wireless >list
pascal@886 11
pascal@886 12 EOT
pascal@886 13 exit 1
pascal@886 14 fi
pascal@886 15
pascal@1032 16 if [ -z "$(ls -d $_pkg/lib/modules/*-slitaz/kernel/$1 2> /dev/null)" ] ; then
pascal@886 17 cat 1>&2 <<EOT
pascal@886 18
pascal@886 19 Error : $1 does not exist.
pascal@886 20
pascal@886 21 EOT
pascal@886 22 exit 1
pascal@886 23 fi
pascal@886 24
pascal@886 25 for tree in $@; do
pascal@886 26 for module in $(find $_pkg/lib/modules/*-slitaz/kernel/$tree \
pascal@886 27 -type f -exec basename {} \;) ; do
pascal@1909 28 grep /$module: $_pkg/lib/modules/*-slitaz/modules.dep ||
pascal@1909 29 find $_pkg/lib/modules/*-slitaz/kernel/$tree -name $module
pascal@886 30 done | awk '{ for (i = 1; i <= NF; i++) print $i; }'
pascal@886 31 done | sort | uniq | sed -e 's,.*slitaz/kernel/,,' -e 's/:$//' | \
pascal@886 32 while read module; do
pascal@886 33 grep -qs ^$module$ $src/modules.list && continue
pascal@886 34 echo $module
pascal@886 35 done