#!/bin/bash CURRENT_DIR=$(pwd) SDK_OUT_DIR=out USER_OUT_DIR=$CURRENT_DIR/out if [[ $1 == '-h' || ! -n $1 || ! -n $2 ]]; then echo "help" echo "./copyfile []" echo "pac_name:pac file name that need to be copy" echo "pac_version:pac file name version" echo "cust_name:tail with pac_name" exit fi if [[ ! -n $3 ]]; then CUST_NAME=_COM else CUST_NAME=_$3 fi #$1 pac_name #$2 pac_version #$3 cust_name SRCFILE=$CURRENT_DIR/../../core_sdk/$SDK_OUT_DIR/HGS_MS5700_0211_debug/hex/$1.pac DESFILE=$USER_OUT_DIR/$1${CUST_NAME}_$2.pac if [ ! -f "$SRCFILE" ]; then echo "$SRCFILE not found" exit fi if [ ! -f "$USER_OUT_DIR" ]; then mkdir -p $USER_OUT_DIR fi cp $SRCFILE $DESFILE echo copy done