}
function fusing_image () {
+ if [ $ab_option == 2 ] ; then
+ echo "Skip to update Partitoin A"
+ return
+ fi
local -r fusing_img=$1
# get binary info using basename
}
function fusing_image_to_b () {
- if [ $ab_option == 0 ] ; then
+ if [ $ab_option == 0 ] ; then
+ echo "Skip to update Partitoin B"
return
fi
local -r fusing_img=$1
function show_usage () {
echo "- Usage:"
- echo " sudo ./sd_fusing*.sh -d <device> [-b <path> <path> ..] [--format] [-ab]"
+ echo " sudo ./sd_fusing*.sh -d <device> [-b <path> <path> ..] [--format] [--update [b] ]"
echo " -d : device ndoe "
echo " -b : binary "
- echo " -ab : If want to update Image about B Partition, use -ab option"
+ echo " --update : If want to update Image about B Partition, use --update option with b"
+ echo " Otherwise, it will be updated to both partition"
}
function check_partition_format () {
binary_option=1
shift
;;
- -ab)
- ab_option=1
+ --update)
+ if [ "$1" == "b" ] ; then
+ ab_option=2
+ else
+ ab_option=1
+ fi
shift
;;
*)