Homebrew + 创建包:如何将文件移动到 $PATH 中的某个位置?
Homebrew + Creating a package: How to move file to somewhere in the $PATH?
我正在尝试按照本教程使我的脚本在自制软件上可用:http://formalfriday.club/2015/01/05/creating-your-own-homebrew-tap-and-formula.html
class GitRedate < Formula
desc "Change the dates of several git commits with a single command"
homepage "https://github.com/PotatoLabs/git-redate"
url "https://github.com/PotatoLabs/git-redate/archive/1.0.0.tar.gz"
version "1.0.0"
sha256 "336cf331429f2e0e030e5fe28bc00a4585dc6084b6937f0d73bc5431715a8506"
def install
// what do i put here to move the git-redate file so that it's loaded in the $PATH ?
end
end
我需要将我的 git-redate
文件移动到 $PATH 中的目录之一。我该怎么做?
您不必自己担心:
def install
bin.install 'package_name'
end
将告诉 brew 在 brew 的 bin 文件夹中安装 'package_name'
(在你的情况下,我假设是 'git-redate'
),该文件夹应该已经在用户的 $PATH
.[=14 中=]
我正在尝试按照本教程使我的脚本在自制软件上可用:http://formalfriday.club/2015/01/05/creating-your-own-homebrew-tap-and-formula.html
class GitRedate < Formula
desc "Change the dates of several git commits with a single command"
homepage "https://github.com/PotatoLabs/git-redate"
url "https://github.com/PotatoLabs/git-redate/archive/1.0.0.tar.gz"
version "1.0.0"
sha256 "336cf331429f2e0e030e5fe28bc00a4585dc6084b6937f0d73bc5431715a8506"
def install
// what do i put here to move the git-redate file so that it's loaded in the $PATH ?
end
end
我需要将我的 git-redate
文件移动到 $PATH 中的目录之一。我该怎么做?
您不必自己担心:
def install
bin.install 'package_name'
end
将告诉 brew 在 brew 的 bin 文件夹中安装 'package_name'
(在你的情况下,我假设是 'git-redate'
),该文件夹应该已经在用户的 $PATH
.[=14 中=]