# Copyright (c) 2021-2022 iSoftStone Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e usage() { cat >&2 << USAGE usage: $0 [-H] --dtb DTB optional arguments: -H, --help show this help message and exit --dtb DTB the dtb file name USAGE } function move_dtb_file() { cd $SRC_DIR mv $OBJ_FILE $PRC_FILE $OBJ_DIR cd - } # Parse command-line arguments while [ $# -gt 0 ]; do case $1 in --mv) SRC_DIR=$2 OBJ_DIR=$3 OBJ_FILE=$4 PRC_FILE=$5 move_dtb_file shift 5 ;; -H | --help) usage exit 0 ;; *) shift ;; esac done