makedist-openmamba-milestone3/platforms/installdvd/pre.inc.sh

37 lines
1.1 KiB
Bash
Raw Permalink Normal View History

# 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]}"
cp $LOCALSTATEDIR/${MEDIA_NAMES[0]} $MOUNTDIR2/rootfs.compressed
echo "- generating MD5 sum for ${MEDIA_NAMES[0]}"
md5sum $MOUNTDIR2/rootfs.compressed > $MOUNTDIR2/rootfs.compressed.MD5