1#!/bin/bash 2# Copyright (c) Huawei Technologies Co., Ltd. 2020-2030. All rights reserved. 3set -e 4 5while getopts "o:i:t:h" arg 6do 7 case "${arg}" in 8 "o") 9 OUT_DIR=${OPTARG} 10 ;; 11 "i") 12 SOURCE_DIR=${OPTARG} 13 ;; 14 "t") 15 TARGET_ARCH=${OPTARG} 16 ;; 17 "h") 18 echo "help" 19 ;; 20 ?) 21 echo "unkonw argument" 22 exit 1 23 ;; 24 esac 25done 26 27if [ ! -d "${OUT_DIR}" ];then 28 mkdir -p ${OUT_DIR} 29fi 30 31mkdir -p ${OUT_DIR}/${TARGET_ARCH}-linux-ohos 32mkdir -p ${OUT_DIR}/x86_64-linux-ohos 33mkdir -p ${OUT_DIR}/i686-linux-ohos 34 35cp -rp ${SOURCE_DIR}/* ${OUT_DIR} 36mv ${OUT_DIR}/asm ${OUT_DIR}/${TARGET_ARCH}-linux-ohos/ 37 38cp -rp ${OUT_DIR}/asm-x86/asm ${OUT_DIR}/x86_64-linux-ohos 39mv ${OUT_DIR}/asm-x86/asm ${OUT_DIR}/i686-linux-ohos 40rm -fr ${OUT_DIR}/asm-x86