git://git.onelab.eu
/
bootcd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge to HEAD as of 2006-08-21
[bootcd.git]
/
build.sh
diff --git
a/build.sh
b/build.sh
index
dded060
..
2549425
100755
(executable)
--- a/
build.sh
+++ b/
build.sh
@@
-10,7
+10,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
-# $Id: build.sh,v 1.
39 2006/07/13 17:51:4
9 mlhuang Exp $
+# $Id: build.sh,v 1.
40 2006/07/25 23:51:3
9 mlhuang Exp $
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@
-88,7
+88,7
@@
FULL_VERSION_STRING="$PLC_NAME BootCD $BOOTCD_VERSION"
# Root of the ISO and USB images
overlay=$(mktemp -d /tmp/overlay.XXXXXX)
install -d -m 755 $overlay
# Root of the ISO and USB images
overlay=$(mktemp -d /tmp/overlay.XXXXXX)
install -d -m 755 $overlay
-trap "rm -rf $overlay" ERR
+trap "rm -rf $overlay" ERR
INT
# Create version files
echo "* Creating version files"
# Create version files
echo "* Creating version files"
@@
-180,11
+180,11
@@
echo "* Compressing overlay image"
(cd $overlay && find . | cpio --quiet -c -o) | gzip -9 >$isofs/overlay.img
rm -rf $overlay
(cd $overlay && find . | cpio --quiet -c -o) | gzip -9 >$isofs/overlay.img
rm -rf $overlay
-trap - ERR
+trap - ERR
INT
# Calculate ramdisk size (total uncompressed size of both archives)
ramdisk_size=$(gzip -l $isofs/bootcd.img $isofs/overlay.img | tail -1 | awk '{ print $2; }') # bytes
# Calculate ramdisk size (total uncompressed size of both archives)
ramdisk_size=$(gzip -l $isofs/bootcd.img $isofs/overlay.img | tail -1 | awk '{ print $2; }') # bytes
-ramdisk_size=$((
$ramdisk_size
/ 1024)) # kilobytes
+ramdisk_size=$((
($ramdisk_size + 1023)
/ 1024)) # kilobytes
# Write isolinux configuration
echo "$FULL_VERSION_STRING" >$isofs/pl_version
# Write isolinux configuration
echo "$FULL_VERSION_STRING" >$isofs/pl_version
@@
-218,7
+218,7
@@
mkfs.vfat -C "$usb" $(($(du -sk $isofs | awk '{ print $1; }') + 1024))
# Mount it
tmp=$(mktemp -d /tmp/bootcd.XXXXXX)
mount -o loop "$usb" $tmp
# Mount it
tmp=$(mktemp -d /tmp/bootcd.XXXXXX)
mount -o loop "$usb" $tmp
-trap "umount $tmp; rm -rf $tmp" ERR
+trap "umount $tmp; rm -rf $tmp" ERR
INT
# Populate it
echo "* Populating USB image"
# Populate it
echo "* Populating USB image"
@@
-228,7
+228,7
@@
echo "* Populating USB image"
mv $tmp/isolinux.cfg $tmp/syslinux.cfg
umount $tmp
rmdir $tmp
mv $tmp/isolinux.cfg $tmp/syslinux.cfg
umount $tmp
rmdir $tmp
-trap - ERR
+trap - ERR
INT
echo "* Making USB image bootable"
$srcdir/syslinux/unix/syslinux "$usb"
echo "* Making USB image bootable"
$srcdir/syslinux/unix/syslinux "$usb"