代码拉取完成,页面将自动刷新
这个项目是 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/
本节的编译需要安装 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/bin
。prefix
需要一致说明 git 的相关代码与预期不一致。
注意:PowerShell 的参数风格与 GNU 的不一致,这里 -prefix
与 --prefix
的差异需要注意。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。