Subversion Repositories livecd

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 beyerle@PS 1
#!/bin/bash
2
# Convert old IMG to new MO module
3
# Author: Tomas M. <http://www.linux-live.org>
4
#
5
 
6
if [ -a ./liblinuxlive ]; then
7
   . ./liblinuxlive
8
else
9
   . /usr/lib/liblinuxlive || exit 1
10
fi
11
 
12
if [ "$2" = "" ]; then
13
   echo
14
   echo "Convert old format module .img (Linux Live < 5) to new .mo format"
15
   echo "Usage: $0 oldmod.img newmod.mo"
16
   exit
17
fi
18
 
19
TMP=/tmp/img2mo$$
20
mkdir -p $TMP
21
mount -o loop $1 $TMP
22
mount -o loop $TMP/mountme.iso $TMP
23
create_module $TMP/data $2
24
if [ $? != 0 ]; then echo "error building compressed image"; exit 1; fi
25
umount $TMP
26
umount $TMP
27
rmdir $TMP