# code_download **Repository Path**: personal_wen/code_download ## Basic Information - **Project Name**: code_download - **Description**: 一键下载openharmony代码 - **Primary Language**: Shell - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 9 - **Created**: 2023-04-05 - **Last Updated**: 2023-04-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # code_download ## 一、脚本介绍 ### 1.1 概述 本仓脚本用于项目中下载ohos分支代码使用,省去下载代码时找对应分支的命令麻烦 ### 1.2 分支介绍 脚本运行后如下所示 ```shell **************************************** * Welcome to download OpenHarmony Code * * Please Choice OpenHarmony SDK: * * OpenHarmony Version * * OpenHarmony master, prese 1.1 * * OpenHarmony 3.2beta2, press 1.2 * * OpenHarmony 3.2beta5, press 1.3 * * OpenHarmony 3.1release, press 1.4 * * OpenHarmony 3.2release, press 1.5 * * OpenHarmony toolchains, press 1.6 * * Qemu Version * * Arm Qemu, press 2.1 * * Arm64 Qemu, press 2.2 * * Riscv Qemu, press 2.3 * * Thead Version * * Thead master, press 3.1 * * Thead 3.2beta2, press 3.2 * * Thead 3.2beta2-merge, press 3.3 * * Thead 3.2beta5, press 3.4 * * Thead 3.1release, press 3.5 * * Thead 3.2release, press 3.6 * * Thead toolchains, press 3.7 * * Local Version * * Local toolchains, press 4.1 * **************************************** ``` - **`OpenHarmony Version`表示下载的`ohos`官方的对应分支** - **`Qemu Version`表示下载的`qemu`项目的对应分支** 当前未配置,无法使用 - **`Thead Version`表示平头哥项目的对应分支** - `master `分支没有配置,无法使用 - `3.2beta2`分支表示正在开发的`3.2beta2`代码 - `3.2beta2-merge`分支表示为合入主干使用的分支 - `3.2beta5`分支表示即将准备配置`3.2beta5`的分支 - `3.1release`分支没有配置,无法使用 - `3.2release`分支没有配置,无法使用 - `toolchains`分支是工具链配置分支 - **`Local Version`个人私仓,不对外开放** ### 1.3 下载介绍 脚本会在`~/OpenHarmony`下创建对应的代码版本路径,如果已经存在则会**直接删除**后重新创建,具体的路径在脚本运行的时候开始`log`中有说明,同样脚本所要执行的下载命令`log`中也会显示打印出来,如下所示 ```shell ================================================================================================ you will download thead OpenHarmony-3.2-Beta2 code url : https://10.20.14.6/gitlab.com/ohos/ohos_thead_beta2/manifest.git branch : OpenHarmony-3.2-Beta2 xml_name : thead_develop.xml code_path : /home/wen_fei/OpenHarmony/thead-3.2beta2 init cmd: repo init -u https://10.20.14.6/gitlab.com/ohos/ohos_thead_beta2/manifest.git -b OpenHarmony-3.2-Beta2 -m thead_develop.xml --no-repo-verify sync cmd: repo sync -c lfs cmd: repo forall -c 'git lfs pull' set_br cmd: repo start OpenHarmony-3.2-Beta2 --all ================================================================================================ ``` ## 二、脚本使用 ```shell git clone https://gitee.com/personal-summary/code_download.git ./code_download.sh # 输入所需下载的分支,例如:3.2表示要下载Thead 3.2beta2分支 ```