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

ipfs/ipfs-update: An updater tool for IPFS

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

开源软件名称:

ipfs/ipfs-update

开源软件地址:

https://github.com/ipfs/ipfs-update

开源编程语言:

Go 76.2%

开源软件介绍:

ipfs-update

An updater tool for ipfs. Can fetch and install given versions of go-ipfs.

Travis CI standard-readme compliant

Install

You can either install a pre-built binary or build ipfs-update from source.

Pre-built Binaries

You can download pre-built binaries at: https://dist.ipfs.io/#ipfs-update

From Source

ipfs-update uses go modules and requires Go version 1.12 or higher:

# You need to CD to a directory _outside_ of your GOPATH.
$ cd /
# Install with go modules enabled
$ GO111MODULE=on go get github.com/ipfs/ipfs-update

Note: Your $GOPATH/bin should be within $PATH for the result ipfs-update binary to be found.

Usage

If you do not see the expected version listed by ipfs-update versions. Try updating ipfs-update (either by the above go get command or through gobuilder).

version

$ ipfs-update version

Prints out the version of ipfs that is currently installed.

versions

$ ipfs-update versions

Prints out all versions of ipfs available for installation.

install

$ ipfs-update install <version>

Downloads, tests, and installs the specified version (or "latest" for latest version) of ipfs. The existing version is stashed in case a revert is needed.

revert

$ ipfs-update revert

Reverts to the previously installed version of ipfs. This is useful if the newly installed version has issues and you would like to switch back to your older stable installation.

fetch

$ ipfs-update fetch [version]

Downloads the specified version of ipfs into your current directory. This is a plumbing command that can be utilized in scripts or by more advanced users.

Install Location

ipfs-update tries to intelligently pick the correct install location for go-ipfs.

  1. If you have go-ipfs installed, ipfs-update will install over your existing install.
  2. If you have a Go development environment setup, it will install go-ipfs along with all of your other go programs.
  3. Otherwise, it will try to pick a sane, writable install location.

Specifically, ipfs-update will install go-ipfs according to the following algorithm:

  1. If go-ipfs is already installed and in your PATH, ipfs-update will replace it. ipfs-update will fail if it can't and won't try to install elsewhere.
  2. If Go is installed:
  3. GOBIN if GOBIN is in your PATH.
  4. For each $path in GOPATH, $path/bin if it's in your PATH.
  5. On Windows:
  6. The current directory if it's writable and in your PATH.
  7. The directory where the ipfs-update executable lives if it's executable and in your path.
  8. The directory where the ipfs-update executable lives if it's executable and in your current working directory.
  9. On all platforms except Windows:
  10. If root: 1. /usr/local/bin if it exists, is writable, and is in your PATH. 2. /usr/bin if it exists, is writable, and is in your PATH.
  11. $HOME/.local/bin if it exists, is writable, and is in your PATH.
  12. $HOME/bin if it exists, is writable, and is in your PATH.
  13. $HOME/.local/bin if we can create it and it's in your PATH.
  14. $HOME/bin if we can create it and it's in your PATH.

Custom IPFS gateway URL

By default, ipfs-update uses https://ipfs.io as the gateway URL. If you wish to use your own IPFS gateway URL, please export it via the environment variable IPFS_CUSTOM_GATEWAY_URL.

For example:

$ IPFS_GATEWAY="https://dweb.link" ipfs-update install latest

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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