#!/bin/sh
#
# get the current settings
#
set -e

CUR_DIR=`pwd`

cd $ROOTDIR

echo `pwd`

. ./$LINUXDIR/.config

if [ "$CONFIG_X86" = y -o "$CONFIG_M586" = y ]; then
	if [ "$CONFIG_JFFS_FS" = y ]; then
		bin/mkflashjffs
	elif [ "$CONFIG_JFFS2_FS" = y ]; then
		bin/mkflashjffs2
	else
		bin/mkflashx86
	fi
elif [ "$CONFIG_FLASH1MB" = y ]; then
	bin/mkflash
elif [ "$CONFIG_FLASH2MB" = y ]; then
	bin/mkflash2mb
elif [ "$CONFIG_FLASH4MB" = y ]; then
	bin/mkflash2mb
else
	echo "$0: Unknown flash size!" >&2
	exit 1
fi

cd $CUR_DIR

exit 0
