mirror-web/help/_posts/2022-09-22-pkgsrc.git.md
2022-09-23 00:15:24 +08:00

38 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
category: help
layout: help
mirrorid: pkgsrc.git
---
## pkgsrc.git 镜像使用帮助
**注:该镜像是 pkgsrc 源码安装的镜像。本镜像站同时提供 pkgsrc 其他功能的镜像如二进制包distfile 等,不包含 joyent 内容),请参考 [pkgsrc 镜像使用帮助](https://{{ site.hostname }}/help/pkgsrc/)。**
### 源码安装
对应[官方文档 getting-via-cvs](https://www.netbsd.org/docs/pkgsrc/pkgsrc.html#getting-via-cvs),本镜像站中 pkgsrc.git 镜像与官方文档中源的 CVS 架构不同,与[官方 git 镜像](https://github.com/NetBSD/pkgsrc)架构类似,故使用命令有所调整。
拉取特定稳定版镜像分支
```bash
git clone -b pkgsrc-2021Q4 https://{{ site.hostname }}/git/pkgsrc.git
```
拉取当前镜像分支
```bash
git clone https://{{ site.hostname }}/git/pkgsrc.git
```
### 源码更新
对应[官方文档 uptodate-cvs](https://www.netbsd.org/docs/pkgsrc/pkgsrc.html#uptodate-cvs),切换到 pkgsrc 目录,执行
```bash
git pull
```
#### 源码切换分支
对应[官方文档 uptodate-cvs-switch](https://www.netbsd.org/docs/pkgsrc/pkgsrc.html#uptodate-cvs-switch),切换到 pkgsrc 目录
切换特定稳定版镜像分支
```bash
git checkout pkgsrc-2021Q4
```
切换当前镜像分支
```bash
git checkout trunk
```