Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
changed buildHook-HybridImage script layout and style
Browse files Browse the repository at this point in the history
  • Loading branch information
Piethein Strengholt committed Nov 16, 2011
1 parent deb23ed commit 9dcca9a
Showing 1 changed file with 65 additions and 16 deletions.
81 changes: 65 additions & 16 deletions SDK/buildHook-HybridImage.sh
Expand Up @@ -18,26 +18,75 @@
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html # http://www.gnu.org/copyleft/gpl.html


rm -rf $WORKPATH/buildDEBs/build-installer.sh INITRAMFS=casper
rm -rf $WORKPATH/buildDEBs/build-live-boot.sh BOOT_LOADER=grub2
rm -rf $WORKPATH/buildDEBs/build-live-config.sh BINARY_IMAGES=iso


rm -rf $WORKPATH/copyFiles-installer.sh if [ "$INITRAMFS" = "casper" ] ; then
rm -rf $WORKPATH/copyFiles-liveBoot.sh


# Set the output to be an USBHDD disk image echo "Using casper initramfs system"
sed -i "s/BINARY_IMAGES=iso/BINARY_IMAGES=iso-hybrid/g" $WORKPATH/buildLive/auto/config


# We have to use syslinux in this case rm -rf $WORKPATH/buildDEBs/build-installer.sh
sed -i "s/BOOT_LOADER=grub2/BOOT_LOADER=syslinux/g" $WORKPATH/buildLive/auto/config rm -rf $WORKPATH/buildDEBs/build-live-boot.sh
rm -rf $WORKPATH/buildDEBs/build-live-config.sh
rm -rf $WORKPATH/copyFiles-installer.sh
rm -rf $WORKPATH/copyFiles-liveBoot.sh


# We need casper in this case # We need casper in this case
sed -i "s/INITRAMFS=live-boot/INITRAMFS=casper/g" $WORKPATH/buildLive/auto/config sed -i "s/INITRAMFS=live-boot/INITRAMFS=casper/g" $WORKPATH/buildLive/auto/config


# No installer # No installer
sed -i "s/INSTALLER=true/INSTALLER=false/g" $WORKPATH/buildLive/auto/config sed -i "s/INSTALLER=true/INSTALLER=false/g" $WORKPATH/buildLive/auto/config


# No grub # Modify grub.cfg if needed
sed -i "s/grub-pc/#grub-pc/g" $WORKPATH/buildLive/Files/config/package-lists/packages.list.chroot sed -i "s/\/live\//\/casper\//g" $WORKPATH/buildLive/Files/config/binary_grub/grub.cfg
rm -rf $WORKPATH/buildLive/Files/config/binary_grub/ sed -i "s/boot=live/boot=casper/g" $WORKPATH/buildLive/Files/config/binary_grub/grub.cfg


fi

if [ "$BINARY_IMAGES" = "iso-hybrid" ] ; then

# Set the output to be an Hybrid iso disk image
sed -i "s/BINARY_IMAGES=iso/BINARY_IMAGES=iso-hybrid/g" $WORKPATH/buildLive/auto/config

if [ "$BOOT_LOADER" = "syslinux" ] ; then

# We have to use syslinux in this case
sed -i "s/BOOT_LOADER=grub2/BOOT_LOADER=syslinux/g" $WORKPATH/buildLive/auto/config

# No grub
sed -i "s/grub-pc/#grub-pc/g" $WORKPATH/buildLive/Files/config/package-lists/packages.list.chroot
rm -rf $WORKPATH/buildLive/Files/config/binary_grub/
fi
fi

if [ "$BINARY_IMAGES" = "hdd" ] ; then

if [ "$BOOT_LOADER" ~ "grub" ] ; then
echo "This combination won't work"
exit 0
fi

# Set the output to be an USBHDD disk image
sed -i "s/BINARY_IMAGES=iso/BINARY_IMAGES=hdd/g" $WORKPATH/buildLive/auto/config

if [ "$BOOT_LOADER" = "syslinux" ] ; then

# We have to use syslinux in this case
sed -i "s/BOOT_LOADER=grub2/BOOT_LOADER=syslinux/g" $WORKPATH/buildLive/auto/config

# No grub
sed -i "s/grub-pc/#grub-pc/g" $WORKPATH/buildLive/Files/config/package-lists/packages.list.chroot
rm -rf $WORKPATH/buildLive/Files/config/binary_grub/

#workaround for Bug#622838 syslinux-live and hdd images
THISDIR=$(pwd)
mkdir -p $WORKPATH/buildLive/Files/config/includes.chroot/usr/share/syslinux/themes/ubuntu-oneiric/isolinux-live
cd $WORKPATH/buildLive/Files/config/includes.chroot/usr/share/syslinux/themes/ubuntu-oneiric/
ln -s isolinux-live syslinux-live
cd isolinux-live
ln -s isolinux.cfg syslinux.cfg
cd $THISDIR

fi
fi

0 comments on commit 9dcca9a

Please sign in to comment.