wok-6.x annotate linux/stuff/gztazmod.sh @ rev 24683

updated jack-audio-connection-kit and jack-audio-connection-kit-dev (0.125.0 -> 1.9.20)
author Hans-G?nter Theisgen
date Sat Mar 12 10:39:47 2022 +0100 (2022-03-12)
parents 873a0ed5aab7
children
rev   line source
pankso@3 1 #!/bin/sh
pankso@3 2 # gztazmod.sh: Compress Linux kernel modules for SliTaz GNU/Linux.
pankso@15855 3 # 2007-2014 <pankso@slitaz.org> - GNU General Public License.
pankso@3 4 #
pankso@15855 5 . /lib/libtaz.sh
pankso@3 6
pankso@3 7 # We do our work in the kernel version modules directory.
pankso@3 8 if [ -z "$1" ] ; then
pankso@15855 9 newline
pankso@15855 10 echo "Usage: $(basename $0) path/to/kernel-version"
pankso@15855 11 newline && exit 1
pankso@3 12 fi
pankso@3 13
pankso@3 14 if [ ! -r "$1" ] ; then
pankso@15855 15 newline
pankso@15855 16 echo -e "Error : $1 does not exist."
pankso@15855 17 newline && exit 1
pankso@3 18 fi
pankso@3 19
pankso@3 20 cd $1
pankso@3 21
pankso@3 22 # Script start.
pankso@15855 23 newline
pankso@3 24 echo "Starting gztazmod.sh to build compressed kernel modules... "
pankso@15855 25 newline
pankso@3 26
pankso@3 27 # Find all modules.
pascal@900 28 echo -n "Searching all modules to compress them... "
pascal@12558 29 find . -name "*.ko" -exec xz '{}' \; 2> /dev/null
pankso@3 30 status
pascal@1907 31 find . -name "*.ko" -exec rm '{}' \;
pankso@3 32
pankso@3 33 # Build a new temporary modules.dep.
pankso@3 34 echo -n "Building tmp.dep... "
pascal@12558 35 sed 's/\.ko.[xg]z/.ko/g' modules.dep > tmp.dep
pascal@12558 36 sed -i 's/\.ko.[xg]z/.ko/g' tmp.dep
pascal@12558 37 sed -i 's/\.ko/.ko.xz/g' tmp.dep
pankso@3 38 status
pankso@3 39
pankso@3 40 # Destroy original modules.dep
pankso@3 41 echo -n "Destroying modules.dep... "
pankso@3 42 rm modules.dep
pankso@3 43 status
pankso@3 44
pankso@3 45 # Remove tmp.dep to modules.dep.
pankso@3 46 echo -n "Removing tmp.dep to modules.dep... "
pankso@3 47 mv tmp.dep modules.dep
pankso@3 48 status
pankso@3 49
pankso@3 50 # Script end.
pankso@15855 51 newline
pankso@3 52 echo "Kernel modules `basename $1` are ready."
pankso@15855 53 newline