makedist-openmamba-milestone3/platforms/livedvd/pre.inc.sh
2011-05-19 16:02:37 +02:00

37 lines
1.2 KiB
Bash

# produce livecd bootable ISO image
MEDIA_NAMES=()
DISTROMATIC_OPT=""
for i in $SUBPLATFORM; do
. $TARGETDIR/platforms/$i/settings.inc
CURR_MEDIA_NAME=`PLATFORM=$i media_name`
MEDIA_NAMES=(${MEDIA_NAMES[*]} $CURR_MEDIA_NAME)
[ "$FORCE" = "1" -o ! -e "$LOCALSTATEDIR/$CURR_MEDIA_NAME" ] && {
makedist $MAKEDIST_TARGET PLATFORM=$i FORCE=1 DISTROMATIC=$DISTROMATIC_OPT || exit 1
DISTROMATIC_OPT="off"
}
done
[ "$PRODUCT_NAME_OVERRIDE" ] && PRODUCT_NAME=$PRODUCT_NAME_OVERRIDE
[ "$PRODUCT_NAME" ] && \
MEDIA_NAME=`PLATFORM=$PRODUCT_NAME media_name` ||
MEDIA_NAME=`media_name`
. $TARGETDIR/platforms/$PLATFORM/settings.inc
echo "Creating bootable livecd..."
[ "$MOUNTDIR" ] && rm -rf $MOUNTDIR/*
[ "$MOUNTDIR2" ] && rm -rf $MOUNTDIR2/*
#[ "$EXTRA_PACKAGES" ] && {
# echo "- installing repository with extra packages"
# add_packages_to_repository $MOUNTDIR/repositories/extras "$EXTRA_PACKAGES"
#}
echo "- installing ${MEDIA_NAMES[0]}"
mkdir -p $MOUNTDIR2/LiveOS
cp $LOCALSTATEDIR/${MEDIA_NAMES[0]} $MOUNTDIR2/LiveOS/squashfs.img
echo "- generating MD5 sum for ${MEDIA_NAMES[0]}"
md5sum $MOUNTDIR2/LiveOS/squashfs.img > $MOUNTDIR2/LiveOS/squashfs.img.MD5