|
Revision 2, 1.2 kB
(checked in by nextime, 2 years ago)
|
Initial import, branching from morphix svn
|
- Property svn:executable set to
|
| Line | |
|---|
| 1 |
#!/bin/sh |
|---|
| 2 |
|
|---|
| 3 |
SRC="$1" |
|---|
| 4 |
DEST="$2" |
|---|
| 5 |
LABEL="$3" |
|---|
| 6 |
|
|---|
| 7 |
if [ -z "$SRC" -o -z "$DEST" ]; then |
|---|
| 8 |
echo "Usage: $0 sourcedirectory destination.iso [Label]" |
|---|
| 9 |
echo |
|---|
| 10 |
echo "This script generates internal md5sum's for the sourcedirectory," |
|---|
| 11 |
echo "and then generates a bootable live CD from the directory" |
|---|
| 12 |
echo "Naturally, destination.iso is the output" |
|---|
| 13 |
exit |
|---|
| 14 |
fi |
|---|
| 15 |
|
|---|
| 16 |
if [ -z "$LABEL" ]; then |
|---|
| 17 |
LABEL="Morphix LiveCD" |
|---|
| 18 |
else |
|---|
| 19 |
LABEL="$LABEL LiveCD" |
|---|
| 20 |
fi |
|---|
| 21 |
|
|---|
| 22 |
find $SRC/ -type f -print0 | xargs -0 md5sum > $SRC/md5sums |
|---|
| 23 |
if [ -e "$SRC/base/boot.img" ]; then |
|---|
| 24 |
mkisofs -pad -l -r -J -v -V "$LABEL" -b base/boot.img -c base/boot.cat -hide -rr -moved -o $DEST $SRC |
|---|
| 25 |
elif [ -e "$SRC/boot/grub/iso9660_stage1_5" ]; then |
|---|
| 26 |
mkisofs -pad -l -r -J -v -V "$LABEL" -b boot/grub/iso9660_stage1_5 -c base/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -hide -rr -moved -o $DEST $SRC |
|---|
| 27 |
elif [ -e "%SRC/base/isolinux.bin" ]; then |
|---|
| 28 |
mkisofs -pad -l -r -J -v -V "$LABEL" -b base/isolinux/isolinux.bin -c base/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -hide -rr -moved -o $DEST $SRC |
|---|
| 29 |
else |
|---|
| 30 |
echo "Error: unable to find bootloader in $SRC. Either update this script, or make sure you have the right directory as src" |
|---|
| 31 |
fi |
|---|