[r94]: livecd / trunk / buildscripts / recreate-iso.sh  Maximize  Restore  History

Download this file

61 lines (50 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
#Usage:
#1. "./recreate-iso.sh" to compress with LZMA improved compression level
#2. "./recreate-iso.sh nolzma" to compress with GZIP standard compression level
VOLNAME="GPartedCD"
BASENAME="gparted-livecd"
VERSION="0.3.4-10-beta-2"
ISODIR=/mnt/gparted/isofiles
TEMPDIR=/var/tmp/catalyst/isotemp
REPODIR=/mnt/gparted/gparted-001/
OLDISO="$ISODIR/gpartedlivecd-current.iso"
PKGDIR="/mnt/gparted/catalyst/tmp/default/livecd-stage2-i686-0.3.X/root"
# ===============================================================================
# ===============================================================================
MYDATE=$(date +%Y%m%d-%Hh%M)
#The source ISO is supposed to be mounted in /mnt/cdrom
if [ ! -f "$OLDISO" ]
then
echo "cannot find \"$OLDISO\". Failed"
exit 1
fi
umount /mnt/cdrom 2>/dev/null
mount -o loop,ro $OLDISO /mnt/cdrom
if [ ! -f /mnt/cdrom/image.squashfs ]
then
echo "Cannot find a valid file in the ISO"
exit 1
fi
# --------- prepare files ---------------
mkdir -p $TEMPDIR
rsync -a --delete --exclude '.svn' /mnt/cdrom/ $TEMPDIR
umount /mnt/cdrom
rm -f $TEMPDIR/livecd
rm -f $TEMPDIR/README.txt
rm -f $TEMPDIR/boot/boot.catalog
if [ "$1" = "nolzma" ]
then
mv $TEMPDIR/image.squashfs $TEMPDIR/sysrcd.dat
else
OLDSQFILE=$TEMPDIR/image.squashfs
mount -o loop,ro $OLDSQFILE /mnt/tmpsquashfs
$REPODIR/overlay-squashfs/usr/bin/mksquashfs /mnt/tmpsquashfs "$TEMPDIR/gparted.dat"
umount /mnt/tmpsquashfs -fl
rm -f $OLDSQFILE
fi
# --------- prepare the ISO image + backup-------
NEWISO="$ISODIR/$BASENAME-$VERSION-$MYDATE.iso"
mkisofs -J -R -l -V $VOLNAME -o $NEWISO -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -hide-rr-moved -c boot/boot.cat $TEMPDIR
tar cfjp "$ISODIR/gpartedlivecd-sourcefiles-$MYDATE.tar.bz2" "$REPODIR"
mv $PKGDIR/gparted-livecd-packages.txt $REPODIR/pkglist/gparted-livecd-packages.txt

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks