source: scripts/compile-iso.bash @ 3006

Revision 2797, 2.8 KB checked in by alanbach-guest, 7 years ago (diff)
  • Updated compile-iso.bash
  • Added chroot.bash, chroot helper script
  • Added start-qemu.bash, to start qemu for iso testing
  • Property svn:executable set to *
Line 
1#!/bin/bash
2# Bash script to compile Parsix ISOs from source
3# Coyright 2005-2008 Alan Baghumian / GNU/GPL
4
5publisher="Parsix Project"
6
7if [ -z "${1}" -o -z "${2}" -o -z "${3}" ]; then
8    echo "Argument(s) is missing, Usage: compile-iso.bash <source32|source64> <version> <isoname>"
9    exit
10fi
11
12if [ "${1}" != "source32" -a "${1}" != "source64" ]; then
13    echo "Invalid root directory."
14    exit
15fi
16
17if [ "${1}" == "source32" ]; then
18     master="master32"
19     debdir="deb32"
20else
21     master="master64"
22     debdir="deb64"
23fi
24
25for x in ${1}/PARSIX/var/cache/apt/archives/*.deb
26do
27        mv $x ${debdir}/ &>/dev/null
28done
29
30rm ${master}/PARSIX/PARSIX &> /dev/null
31
32if [ -f ${1}/PARSIX/root/.bash_history ]; then
33        rm ${1}/PARSIX/root/.bash_history
34fi
35
36rm ${1}/PARSIX/root/.less* &> /dev/null
37rm ${1}/PARSIX/root/.vim* &> /dev/null
38rm ${1}/PARSIX/root/.rnd* &> /dev/null
39rm ${1}/PARSIX/var/cache/apt/archives/partial/* &> /dev/null
40
41# Refresh RC links
42rm  ${1}/PARSIX/etc/rc*.d/* &>/dev/null
43(cd ${1}/PARSIX/etc/rc0.d/ && ln -s ../init.d/live-halt S90live-halt)
44(cd ${1}/PARSIX/etc/rc3.d/ && ln -s ../init.d/pis S05pis)
45(cd ${1}/PARSIX/etc/rc5.d/ && ln -s ../init.d/xprep S80xprep)
46(cd ${1}/PARSIX/etc/rc6.d/ && ln -s ../init.d/live-reboot S90live-reboot)
47(cd ${1}/PARSIX/etc/rcS.d/ && ln -s ../init.d/live-autoconfig S00live-autoconfig)
48
49# Fix Menus
50sed -i s/"Name=GNOME PPP$"/"Name=Dialup Internet Connection"/g ${1}/PARSIX/usr/share/applications/gnome-ppp.desktop &>/dev/null
51sed -i s/"Name=GQview$"/"Name=GQview Image Viewer"/g ${1}/PARSIX/usr/share/applications/gqview.desktop &>/dev/null
52sed -i s/"Name=Grisbi$"/"Name=Grisbi Accounting"/g ${1}/PARSIX/usr/share/applications/grisbi.desktop &>/dev/null
53sed -i s/"Name=Firestarter$"/"Name=Firestarter Desktop Firewall"/g ${1}/PARSIX/usr/share/applications/firestarter.desktop &>/dev/null
54sed -i s/"Name=Balsa$"/"Name=Balsa Email Client"/g ${1}/PARSIX/usr/share/applications/balsa.desktop &>/dev/null
55sed -i s/"Name=gFTP$"/"Name=Gnome FTP Client"/g ${1}/PARSIX/usr/share/applications/gftp.desktop &>/dev/null
56sed -i s/"Name=Wammu$"/"Name=Mobile Phone Manager"/g ${1}/PARSIX/usr/share/applications/wammu.desktop &>/dev/null
57sed -i s/"Categories=Utility;ContactManagement;Office;GTK;"/"Categories=Utility;ContactManagement;GTK;"/g ${1}/PARSIX/usr/share/applications/wammu.desktop &>/dev/null
58sed -i s/"Exec=\/usr\/sbin\/pppoeconf"/"Exec=gksu \/usr\/sbin\/pppoeconf"/g ${1}/PARSIX/usr/share/applications/pppoeconf.desktop &>/dev/null
59
60# SquashFS Compression
61mksquashfs ${1}/PARSIX/ ${master}/PARSIX/PARSIX -b 65536
62
63# Generate ISO
64(cd ${master}/ && find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin -exec md5sum '{}' \; > PARSIX/md5sums)
65
66mkisofs -pad -l -r -J -v -V ${2} -P "${publisher}" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o iso/${3} ${master}/
67
Note: See TracBrowser for help on using the repository browser.