5 Star 6 Fork 4

GiteeStudio / git-dist

加入 Gitee
与超过 1000 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
ReadMe.zh-CN.md

Git 快速构建脚本

这个项目是 Gitee 的 Git 构建脚本集合。

常规操作

编译安装 Git,源代码来自 mirrors.edge.kernel.org:

bash <(curl -fsSL https://gitee.com/oscstudio/git-dist/raw/master/git-dist-kernel.sh)

编译安装 Git,源代码来自:Github

bash <(curl -fsSL https://gitee.com/oscstudio/git-dist/raw/master/git-dist.sh)

安装 CMake 二进制来自于:CMake

bash <(curl -fsSL https://gitee.com/oscstudio/git-dist/raw/master/cmake.sh)

安装 CMake 二进制来自于:Github

bash <(curl -fsSL https://gitee.com/oscstudio/git-dist/raw/master/cmake-github.sh)

创建符号链接

sudo ln -sf /usr/local/bin/git* /usr/bin/

构建 git 的 STGZ 安装包:

本节的编译需要安装 PowerShell Core。

git clone https://gitee.com/oscstudio/git-dist.git
cd git-dist/ps
./build.ps1 -prefix /usr/local -pack
/tmp/workroot/git-linux-amd64-${GIT_VERSION}.sh --pefix=/usr/local

构建 STGZ 安装包的脚本通常运行较慢,因其需要下载 OpenSSL,CURL,NGHTTP2 等依赖并编译。另外,构建过程中设置的 -prefix 应当与 安装的 --prefix 一致,只要是操作系统发行版向下兼容的,基本上可以直接分发 git-linux-amd64-${GIT_VERSION}.sh 到特定机器上进行安装,从而省去了编译的过程,实际上为了避免卸载麻烦,可以统一 prefix/home/git/tools 然后将 /home/git/tools/bin/git* 软链到 /usr/local/binprefix 需要一致说明 git 的相关代码与预期不一致。

注意:PowerShell 的参数风格与 GNU 的不一致,这里 -prefix--prefix 的差异需要注意

简介

git auto build script 展开 收起
Shell 等 2 种语言
MIT
取消

发行版

暂无发行版

git-dist

贡献者

全部

近期动态

加载更多
不能加载更多了
Shell
1
https://gitee.com/oscstudio/git-dist.git
git@gitee.com:oscstudio/git-dist.git
oscstudio
git-dist
git-dist
master

搜索帮助