【问题标题】:Automated installation with Brew/cask in apps folder在应用程序文件夹中使用 Brew/cask 自动安装
【发布时间】:2015-12-20 18:34:01
【问题描述】:

我想创建一个用于后期安装的自动化脚本。 出于这个原因,我想使用 brew 和 cask 来完成这一切。 所以,我认为我的脚本应该从安装 brew 开始:

echo << "Installing homebrew..."
if test ! $(which brew); then
    echo "Homebrew not found, Installing..."
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

然后我需要安装一些有用的东西,如下所示:

http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac

所以我也把它放在我的脚本上:

# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils

# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils

# Install Bash 4
brew install bash

# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
$PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH

在那之后,链接上的指南说要安装所有应用程序,并使用 cask and clean。 这是我的问题。 我希望安装并可以在将来使用 mac 的经典应用程序文件夹更新它们 我该怎么做?

也许我应该写这行:

export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/usr/local/Caskroom"

在安装应用程序的所有命令之前?它可以工作吗? (我在这里找到了这条线) 如果此行正确,我可以使用 brew/cask 命令更新我的应用程序吗?

对不起,愚蠢的问题,我昨天才发现 brew and cask :) 对此脚本的任何建议或示例都被广泛接受:)

【问题讨论】:

  • “今天刚刚发现木桶”通过任何随机博客都不是不阅读自述文件或运行man brew-cask 的借口。 github.com/caskroom/homebrew-cask/blob/master/USAGE.md.
  • 嗯,不完全是今天,但几天前,无论如何我的问题是关于脚本而不是 caks 本身:)
  • 第一个链接让我们通过重定向的兔子洞。

标签: bash shell homebrew


【解决方案1】:

brew cask install &lt;formula&gt; 应该在Applications 中自动符号链接您的应用程序。

【讨论】:

    猜你喜欢
    • 2020-07-27
    • 1970-01-01
    • 2023-03-15
    • 2019-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-25
    • 1970-01-01
    相关资源
    最近更新 更多