#!/usr/bin/env bash
###
 # Copyright (c) ShineAuto CO., Ltd. 2023. All Rights Reserved.
 # @Descripttion: 
### 

if [  $# -ne 6  ] ; then
        echo "********************************************************************"
        echo  cmd wrong!
        echo example  bash copy_one_modules.sh debug_or_release save_dir  src_dir  module_name exe_name outputcfg_dir 
        echo "********************************************************************"
        echo ""
       exit 1
    fi
    
binary_dir=$1
save_dir=$2
src_dir=$3
module_name=$4
exe_name=$5
outputcfg_dir=$6

mkdir -p $save_dir/$module_name/bin
mkdir -p $save_dir/$module_name/etc
cp $binary_dir/$exe_name $save_dir/$module_name/bin
cp $outputcfg_dir/*  $save_dir/$module_name/etc
cp $src_dir/scripts/modules/$module_name/start.sh $save_dir/$module_name

