customize_iso 866 Bytes
Newer Older
Lars Beckers's avatar
Lars Beckers committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#!/bin/bash
SCRIPT_DIR=`dirname "$0"`
REMASTER_HOME=${1:-~/tmp}
ISO_REMASTER_DIR="$REMASTER_HOME/remaster-iso"
REMASTER_DIR="$REMASTER_HOME/remaster-root"
ISO_DESCRIPTION_PREFIX_FILE="$SCRIPT_DIR/iso_description_prefix"

if [ -e "$SCRIPT_DIR/customize_common" ]; then
        source "$SCRIPT_DIR/customize_common"
fi

function create_md5sums()
{
	pushd "$REMASTER_DIR"
	find . -type f -print0 | sort -z | xargs -0 md5sum > "$REMASTER_HOME/rootfs.md5"
	popd
}

function write_iso_description()
{
	ISO_ARCH="32Bit"
	if [ "$(uname -m)" == "x86_64" ]; then 
		ISO_ARCH="64Bit"
	fi

	ISO_PREFIX="LIP ISO"
	if [ -e "$ISO_DESCRIPTION_PREFIX_FILE" ]; then
		ISO_PREFIX="$(cat $ISO_DESCRIPTION_PREFIX_FILE)"
	fi

	echo "$ISO_PREFIX $ISO_ARCH" > "$SCRIPT_DIR/iso_description"
}

#create_md5sums

write_iso_description
patch_all "$SCRIPT_DIR/iso-patches/" "$ISO_REMASTER_DIR/"