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

COMMAND="m30_param_set"

SCRIPT_FILE=(
	"CParam.sh"
	"VIParam.sh"
	"VINParam.sh"
	"VAParam.sh"
	"EHParam.sh"
	"RParam.sh"
	"NParam.sh"
	"EAParam.sh"
	"EMParam.sh"
	"MUParam.sh"
	"MASParam.sh"
	"AEParam.sh"
	"AESParam.sh"
	"AINParam.sh"
	"AINSParam.sh"
	"AIParam.sh"
	"AIPParam.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 *.bin /tmp

echo
echo "Done."
echo

