OpenHarmony開發筆記:獲取原始碼(repo安裝)

2020-10-16 12:01:02

參考部落格:Linux ubuntu repo安裝方法

建立.bin資料夾

mkdir ~/.bin

新增.bin環境變數

vim ~/.bashrc

末尾新增:

export PATH=~/.bin:$PATH

下載repo

git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

將git-repo中的repo檔案複製到.bin目錄中,並修改許可權

cd git-repo
cp repo ~/.bin
chmod a+x ~/.bin/repo

建立OpenHarmony原始碼的目錄

mkdir ~/harmony
cd ~/harmony
mkdir .repo

將下載的git-repo拷貝到.repo下,並改名為 repo

cp -r git-repo ~/harmony/.repo
cd ~/harmony/.repo
mv git-repo repo

獲取openharmony原始碼

cd ~/harmony
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c
ls
applications  build     docs     drivers     kernel     test         utils
base          build.py  domains  foundation  prebuilts  third_party  vendor