copy_uapi.sh 749 字节
Newer Older
Z
zhuoli 已提交
1

Z
zhuoli 已提交
2
while getopts "o:i:t:h" arg
Z
zhuoli 已提交
3 4 5 6 7 8 9 10
do
    case "${arg}" in
        "o")
            OUT_DIR=${OPTARG}
            ;;
        "i")
            SOURCE_DIR=${OPTARG}
            ;;
Z
zhuoli 已提交
11 12 13
	"t")
	    TARGET_ARCH=${OPTARG}
	    ;;
Z
zhuoli 已提交
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
        "h")
            echo "help"
            ;;
        ?)
            echo "unkonw argument"
            exit 1
            ;;
    esac
done

if [ ! -d "${OUT_DIR}" ];then
    mkdir -p ${OUT_DIR}
fi
cp -r ${SOURCE_DIR}/* ${OUT_DIR}

Z
zhuoli 已提交
29 30 31 32 33 34 35 36 37
if [ ${TARGET_ARCH} = "arm" ]; then
    mv ${OUT_DIR}/asm-arm/asm ${OUT_DIR}/asm
    rm -rf ${OUT_DIR}/asm-arm64
    rm -rf ${OUT_DIR}/asm-arm
elif [ ${TARGET_ARCH} = "aarch64" ]; then
    mv ${OUT_DIR}/asm-arm64/asm ${OUT_DIR}/asm
    rm -rf ${OUT_DIR}/asm-arm64
    rm -rf ${OUT_DIR}/asm-arm
fi
Z
zhuoli 已提交
38