wok-6.x view ndiswrapper-driver/stuff/gztazmod.sh @ rev 11060
pcmciautils: Fixed WGET_URL.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Oct 17 00:27:48 2011 +0000 (2011-10-17) |
parents | |
children |
line source
1 #!/bin/sh
2 # gztazmod.sh: Compress Linux kernel modules for SliTaz GNU/Linux.
3 # 2007/10/04 <pankso@slitaz.org> - GNU General Public License.
4 #
6 # We do our work in the kernel version modules directory.
7 if [ -z "$1" ] ; then
8 echo ""
9 echo -e "\033[1musage:\033[0m `basename $0` path/to/kernel-version"
10 echo ""
11 exit 1
12 fi
14 if [ ! -r "$1" ] ; then
15 echo ""
16 echo -e "Error : $1 does not exist."
17 echo ""
18 exit 1
19 fi
21 cd $1
23 # Status functions.
24 status()
25 {
26 local CHECK=$?
27 echo -en "\\033[70G[ "
28 if [ $CHECK = 0 ]; then
29 echo -en "\\033[1;33mOK"
30 else
31 echo -en "\\033[1;31mFailed"
32 fi
33 echo -e "\\033[0;39m ]"
34 }
36 # Script start.
37 echo ""
38 echo "Starting gztazmod.sh to build compressed kernel modules... "
39 echo ""
41 # Find all modules.
42 echo -n "Searching all modules to gzip them... "
43 find . -name "*.ko" -exec gzip '{}' \;
44 status
46 # Build a new temporary modules.dep.
47 echo -n "Building tmp.dep... "
48 sed 's/\.ko/.ko.gz/g' modules.dep > tmp.dep
49 status
51 # Destroy original modules.dep
52 echo -n "Destroying modules.dep... "
53 rm modules.dep
54 status
56 # Remove tmp.dep to modules.dep.
57 echo -n "Removing tmp.dep to modules.dep... "
58 mv tmp.dep modules.dep
59 status
61 # Script end.
62 echo ""
63 echo "Kernel modules `basename $1` are ready."
64 echo ""