diff --git a/llvm-build/env_prepare.sh b/llvm-build/env_prepare.sh index 552fbdba47722853296a9102ac013d6c9d6b0d29..7bc5960555adb9a31b63b8587629fafcd4f2207e 100755 --- a/llvm-build/env_prepare.sh +++ b/llvm-build/env_prepare.sh @@ -22,6 +22,17 @@ esac # sync code directory code_dir=$(pwd) +#ceshi +#ceshi 1 +#测试 2 +#ceshi 3 +#ceshi 4 +#测试5 +#ceshi6 +#测试7 +#测试8 +#manifest 合入测试 +#ignore测试 # downloaded files will be automatically unzipped under this path bin_dir=${code_dir}/download_packages @@ -49,13 +60,29 @@ function download_and_archive() { fi } +function copy_and_archive() { + archive_dir=$1 + download_source_url=$2 + bin_file=$(basename ${download_source_url}) + cp -r /home/tools/${bin_file} "${bin_dir}/${bin_file}" + if [ ! -d "${code_dir}/${archive_dir}" ];then + mkdir -p "${code_dir}/${archive_dir}" + fi + if [ "X${bin_file:0-3}" = "Xzip" ];then + unzip -o "${bin_dir}/${bin_file}" -d "${code_dir}/${archive_dir}/" + elif [ "X${bin_file:0-6}" = "Xtar.gz" ];then + tar -xvzf "${bin_dir}/${bin_file}" -C "${code_dir}/${archive_dir}" + else + tar -xvf "${bin_dir}/${bin_file}" -C "${code_dir}/${archive_dir}" + fi +} + copy_config=""" """ copy_config_linux_x86_64=""" prebuilts/cmake,https://mirrors.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/${host_platform}/cmake-${host_platform}-x86-3.16.5.tar.gz -prebuilts/clang/ohos/${host_platform}-${host_cpu},https://mirrors.huaweicloud.com/openharmony/compiler/clang/10.0.1-62608/${host_platform}/llvm.tar.gz prebuilts/clang/ohos/${host_platform}-${host_cpu},https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz """ @@ -91,9 +118,14 @@ for i in $(echo ${copy_config}) do unzip_dir=$(echo $i|awk -F ',' '{print $1}') remote_url=$(echo $i|awk -F ',' '{print $2}') - download_and_archive "${unzip_dir}" "${remote_url}" + copy_and_archive "${unzip_dir}" "${remote_url}" done +sleep 10 + +echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" +ln -s "${code_dir}/prebuilts/clang/ohos/${host_platform}-${host_cpu}/clang-10.0.1" "${code_dir}/prebuilts/clang/ohos/${host_platform}-${host_cpu}/llvm" +echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" if [ -d "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-62608" ];then rm -rf "${code_dir}/prebuilts/clang/ohos/linux-x86_64/llvm"