#!/bin/bash -eu
#------------------------------------------------------------------
# Create MB86M30 initial parameter binary files.
#------------------------------------------------------------------
echo "Creating M30 parameter binary files "

COMMAND="m30_param_set_dec"

SCRIPT_FILE=(
	"CParam.sh"
	"DParam.sh"
	"SIParam.sh"
	"DMXParam.sh"
	"VDParam.sh"
	"VFParam.sh"
	"VOParam.sh"
	"VDOParam.sh"
	"ADParam.sh"
	"AOParam.sh"
	)

#
# Check required files exists and call set command
#
echo "Loop start"
for (( i = 0; i < ${#SCRIPT_FILE[@]}; ++i ))
do
	${COMMAND} ${SCRIPT_FILE[i]}
done

cp VOParam_0.bin VOParam_1.bin
cp VOParam_0.bin VOParam_2.bin
cp VOParam_0.bin VOParam_3.bin

cp *.bin /tmp

echo
echo "Done."
echo

