--------------------
该脚本首先分机然后格式化。一个fat分机,一个ext3分区
-------------------
#! /bin/sh
#
#分区并格式化SD卡脚本
#usage mksdboot.sh --device /dev/sdb
VERSION="0.1"
execute ()
{
$* >/dev/null
if [ $? -ne 0 ]; then
echo
echo "ERROR: executing $*"
echo
exit 1
fi
}
version ()
{
echo
echo "`basename $1` version $VERSION"
echo
exit 0
}
usage ()
{
echo "
Usage: `basename $1` <options> [ files for install partition ]
Mandatory options:
--device SD block device node (e.g /dev/sdd)
Optional options:
--version Print version.
--help Print this help message.
"
exit 1
}
# Process co