diff --git a/.gitignore b/.gitignore index 243eb3eb24badde0d1f464fb5d52e331f87524a6..fa310e1b594e4561f59fe3c8e79aa82b24aa0b57 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ bin-release/ # information for Eclipse / Flash Builder. .vscode -.DS_Store \ No newline at end of file +.DS_Store +download \ No newline at end of file diff --git a/config/rpmlist b/config/rpmlist index 4de1914da11faac009a4b0f28a5444eca67050e4..cc75bc9757da0094aaf3cb45d1a6feb943310f21 100644 --- a/config/rpmlist +++ b/config/rpmlist @@ -166,4 +166,37 @@ vte291 yelp yelp-tools yelp-xsl -zenity \ No newline at end of file +zenity +vim +gcc +clang +g++ +python +java +rust +node +gdb +gtest +gtest-devel +pytest +CUnit +CUnit-devel +perf +hostname +git +make +cmake +firefox +gedit +ibus +bus-libpinyin +bison +flex +m4 +ncurses-devel +elfutils-devel +openssl-devel +bc +rpm-build +dwarves +python3 \ No newline at end of file diff --git a/config/urls b/config/urls index 6e0909e290a0c2202dd161ff2d09636790bb98dc..3de9edb750ecefce43f1b02727e0cb0726db0ea1 100644 --- a/config/urls +++ b/config/urls @@ -1,3 +1,4 @@ https://eulermaker.compass-ci.openeuler.openatom.cn/api/ems4/repositories/mutter1/openEuler%3A22.03-LTS-SP3/aarch64/history/ec9c2df0-f86a-11ee-843d-eaa4b7c8615d/steps/upload/cbs.3937309/mutter-3.38.4-9.oe2203sp3.aarch64.rpm -file://opengauss-5.0.1-1.aarch64.rpm -https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balena-etcher-electron-1.7.9+5945ab1f.aarch64.rpm \ No newline at end of file +https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/opengauss_rpm/opengauss-5.0.1-1.aarch64.rpm +https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/balena-etcher-electron-1.7.9+5945ab1f.aarch64.rpm +https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%207.0.0/Ascend-cann-toolkit-7.0.0-linux.aarch64.rpm \ No newline at end of file diff --git a/scripts/install_rpms.sh b/scripts/install_rpms.sh index df8f0451909ffbbdf627d54d5e761718458f1907..53564be793fe956cb1f7ffe4d9a14c9b5a5aad0f 100644 --- a/scripts/install_rpms.sh +++ b/scripts/install_rpms.sh @@ -6,13 +6,17 @@ source ./log.sh function download_file() { + set +e local url="$1" local file_path=$(basename "$url") - LOG "download_file ${file_path} begin ..." + pushd ${DOWNLOAD_DIR} if [ ! -f "$file_path" ]; then wget "$url" -O "$file_path" --no-check-certificate # 检查文件是否下载成功 + if [ $? -ne 0 ]; then + rm -f ${file_path} + fi if [ ! -f "$file_path" ]; then LOG "Failed to download $file_path." exit 1 @@ -20,6 +24,7 @@ function download_file() fi popd LOG "download_file ${file_path} end ..." + set -e echo "$file_path" } @@ -44,6 +49,7 @@ function install_url_rpms() local url_rpms=$1 for url in $(cat $url_rpms) do + LOG "downloading ${url} ..." local_rpm=$(download_file "$url" | tail -n 1) localinstall_package ${local_rpm} done