wok-6.x rev 14028
linux: check_modules.sh do not create $WOK/tmp
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 18 10:10:03 2013 +0100 (2013-02-18) |
parents | caf768bb46f9 |
children | e1defd13e80a |
files | linux/stuff/check_modules.sh |
line diff
1.1 --- a/linux/stuff/check_modules.sh Mon Feb 18 09:47:47 2013 +0100 1.2 +++ b/linux/stuff/check_modules.sh Mon Feb 18 10:10:03 2013 +0100 1.3 @@ -13,14 +13,15 @@ 1.4 src="$WOK/linux/source/linux-$VERSION" 1.5 1.6 cd $src 1.7 -mkdir -p $WOK/$PACKAGE/tmp 2>/dev/null 1.8 -rm -f $WOK/$PACKAGE/tmp/* 1.9 +tmp=$WOK/${PACKAGE:-linux}/tmp 1.10 +mkdir -p $tmp 2>/dev/null 1.11 +rm -f $tmp/* 1.12 1.13 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs" 1.14 echo "======================================================================" 1.15 1.16 # create a packaged modules list 1.17 -cat $WOK/linux/stuff/modules.list >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list 1.18 +cat $WOK/linux/stuff/modules.list >> $tmp/pkgs-modules-"$VERSION".list 1.19 1.20 for i in $(cd $WOK; grep -l '^WANTED="linux"' */receipt | sed 's|/receipt||g') 1.21 do 1.22 @@ -28,7 +29,7 @@ 1.23 if [ ! $(grep -l 'linux-libre' $WOK/$i/receipt) ]; then 1.24 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko..z") 1.25 do 1.26 - basename $j >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list 1.27 + basename $j >> $tmp/pkgs-modules-"$VERSION".list 1.28 done 1.29 fi 1.30 done 1.31 @@ -36,22 +37,22 @@ 1.32 for i in $(find $_pkg -iname "*.ko.?z") 1.33 do 1.34 basename $i 1.35 -done > $WOK/$PACKAGE/tmp/original-"$VERSION".list 1.36 +done > $tmp/original-"$VERSION".list 1.37 # compare original .config and pkged modules 1.38 -for i in $(cat $WOK/$PACKAGE/tmp/original-$VERSION.list) 1.39 +for i in $(cat $tmp/original-$VERSION.list) 1.40 do 1.41 - if ! grep -qs "$i" $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list ; then 1.42 + if ! grep -qs "$i" $tmp/pkgs-modules-"$VERSION".list ; then 1.43 modpath=`find $_pkg -iname "$i"` 1.44 echo "Orphan module: $i" 1.45 - echo "$i : $modpath" >> $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list 1.46 + echo "$i : $modpath" >> $tmp/unpackaged-modules-"$VERSION".list 1.47 fi 1.48 done 1.49 -if [ -f $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list ]; then 1.50 +if [ -f $tmp/unpackaged-modules-"$VERSION".list ]; then 1.51 echo "======================================================================" 1.52 echo -e "Check linux/tmp/unpackaged-modules-$VERSION.list for mod path\n" 1.53 else 1.54 echo -e "\nAll modules are packaged\n" 1.55 echo "======================================================================" 1.56 echo "" 1.57 - rm -rf $WOK/$PACKAGE/tmp 1.58 + rm -rf $tmp 1.59 fi