Browse Source

社区资源下载

pull/1697/head
刘康 4 years ago
parent
commit
e4f89becf8
2 changed files with 48 additions and 3 deletions
  1. +6
    -2
      scripts/readme.md
  2. +42
    -1
      scripts/update/ge_update.sh

+ 6
- 2
scripts/readme.md View File

@@ -41,7 +41,7 @@ $ cd ./scripts
$ ./ge.sh env $ ./ge.sh env
``` ```


3.配置外部依赖服务器信息
3.配置外部依赖服务器信息,社区安装跳过此步骤。
```sh ```sh
ge config -i=121.36.**.** -u=asc**, -p=Asc***\#@\!$ (Need add escape character \ before special charactor $、#、!) ge config -i=121.36.**.** -u=asc**, -p=Asc***\#@\!$ (Need add escape character \ before special charactor $、#、!)
``` ```
@@ -49,7 +49,10 @@ ge config -i=121.36.**.** -u=asc**, -p=Asc***\#@\!$ (Need add escape charact
4.下载和安装构建所依赖的外部库 4.下载和安装构建所依赖的外部库


```sh ```sh
$ ge update
社区安装
$ ge update -p
非社区安装
$ ge update
``` ```


(注:进入容器后,`ge`命令已经自动注册进系统,因此容器内不需要写脚本全称) (注:进入容器后,`ge`命令已经自动注册进系统,因此容器内不需要写脚本全称)
@@ -164,6 +167,7 @@ Usage: ge update [OPTIONS]
update dependencies of build and test update dependencies of build and test


Options: Options:
-p, --public Download dependencies from community
-d, --download Download dependencies -d, --download Download dependencies
-i, --install Install dependencies -i, --install Install dependencies
-c, --clear Clear dependencies -c, --clear Clear dependencies


+ 42
- 1
scripts/update/ge_update.sh View File

@@ -34,6 +34,19 @@ function extract_deps_so()
./${DEV_TOOLS_PACKAGE}/${FWKACL_RUN_NAME} --noexec --extract=${DEP_TMP_DIR}/fwkacllib ./${DEV_TOOLS_PACKAGE}/${FWKACL_RUN_NAME} --noexec --extract=${DEP_TMP_DIR}/fwkacllib
} }


function extract_deps_so_community()
{
echo "begin to extract .run file ........."
chmod 777 ./${DRIVER_RUN_NAME_C}
chmod 777 ./${PACKAGE_NAME_C}
[ -n "${DEP_TMP_DIR}" ] && rm -rf "${DEP_TMP_DIR}"
./${DRIVER_RUN_NAME_C} --noexec --extract=${DEP_TMP_DIR}/driver
./${PACKAGE_NAME_C} --noexec --extract=${DEP_TMP_DIR}/Packages_tmp
${DEP_TMP_DIR}/Packages_tmp/run_package/${ATC_RUN_NAME_C} --noexec --extract=${DEP_TMP_DIR}/atc
${DEP_TMP_DIR}/Packages_tmp/run_package/${ACL_RUN_NAME_C} --noexec --extract=${DEP_TMP_DIR}/acllib
${DEP_TMP_DIR}/Packages_tmp/run_package/${FWKACL_RUN_NAME_C} --noexec --extract=${DEP_TMP_DIR}/fwkacllib
}

function copy_so_to_target_dir() function copy_so_to_target_dir()
{ {
mkdir -p $DEP_LIB_DIR mkdir -p $DEP_LIB_DIR
@@ -62,6 +75,19 @@ function download_runs()


} }


function download_runs_from_community
{
source ${PROJECT_HOME}/scripts/update/deps_config_community.sh
echo "begin to download .run file from community........."
clear_libs
mkdir -p ./ ${DOWNLOAD_PATH}
pushd "${DOWNLOAD_PATH}" >/dev/null
cd ${DOWNLOAD_PATH}
wget ${DRIVER_URL_C}
wget ${PACKAGE_URL_C}
popd >/dev/null
}

function install_deps() function install_deps()
{ {
source scripts/update/deps_config.sh source scripts/update/deps_config.sh
@@ -73,6 +99,16 @@ function install_deps()
popd >/dev/null popd >/dev/null
} }


function install_deps_community()
{
source ${PROJECT_HOME}/scripts/update/deps_config_community.sh
mkdir -p ./ ${DOWNLOAD_PATH}
pushd "${DOWNLOAD_PATH}" >/dev/null
cd ${DOWNLOAD_PATH}
extract_deps_so_community
copy_so_to_target_dir
popd >/dev/null
}


function help(){ function help(){
cat <<-EOF cat <<-EOF
@@ -81,6 +117,7 @@ Usage: ge update [OPTIONS]
update dependencies of build and test update dependencies of build and test


Options: Options:
-p, --public Download dependencies from community
-d, --download Download dependencies -d, --download Download dependencies
-i, --install Install dependencies -i, --install Install dependencies
-c, --clear Clear dependencies -c, --clear Clear dependencies
@@ -90,7 +127,7 @@ EOF
} }


function parse_args(){ function parse_args(){
parsed_args=$(getopt -a -o dich --long download,install,clear,help -- "$@") || {
parsed_args=$(getopt -a -o dich --long public,download,install,clear,help -- "$@") || {
help help
exit 1 exit 1
} }
@@ -104,6 +141,10 @@ function parse_args(){
eval set -- "$parsed_args" eval set -- "$parsed_args"
while true; do while true; do
case "$1" in case "$1" in
-p | --public)
download_runs_from_community
install_deps_community
;;
-d | --download) -d | --download)
download_runs download_runs
;; ;;


Loading…
Cancel
Save