• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

git-dist: git auto build script

原作者: [db:作者] 来自: 网络 收藏 邀请

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.gitcd 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 的差异需要注意


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap