1
xiamx 2016-05-05 08:47:51 +08:00
Try GitHub Boxen
1. /opt/homebrew-cask: managed by brew-cask. /Applications: unmanaged 2. Most cases not, depends on the app |
2
xream 2016-05-05 09:13:16 +08:00
我还是觉得 cask 很蛋疼 然后就改了 HOMEBREW_CASK_OPTS '--appdir=/Applications --caskroom=/Applications'
|
3
ynyounuo 2016-05-05 09:44:59 +08:00 via iPhone
3. 并不是
4. 可用 Brew Cask 安装 |
4
xucheng 2016-05-05 19:14:06 +08:00
|
5
abao00001 2016-05-06 07:02:14 +08:00
其实没什么区别,现在看到我使用的 app 里面只有 1password 和 chrome 有影响,因为我的 1password 是 mas 买的,由于沙盒机制 brew cask 安装的 chrome 不能调用 1password 。但是可以 brew cask 安装 1password ,授权会自动转移。对于以前安装在 application 里的 app ,可以直接拖入 trash ,然后用 brew cask 安装,设置不会受影响,这说明 brew cask 其实只是改变了安装方式, app 运行和建立相关文档同在 application 里一样,甚至卸载既可以使用 brew cask uninstall ,也可以用辅助的 appcleaner 一类 app 卸载。最后说更新,很多人抱怨不能更新,但是后来在网上看到有人写了个码,解决的更新的问题:
casks=( $(brew cask list) ) if [[ "$1" == "upgrade" ]]; then for cask in ${casks[@]}; do current="$(brew cask info $cask | sed -n '1p' | sed -n 's/^.*: \(.*\)$/\1/p')" installed=( $(ls /opt/homebrew-cask/Caskroom/$cask)) if (! [[ " ${installed[@]} " == *" $current "* ]]); then echo "Upgrading $cask to v$current." (set -x; brew cask install $cask --force;) else echo "$cask v$current is up-to-date, skipping." fi done else echo "Inspecting ${#casks[@]} casks. Use 'brew-cask.sh upgrade' to perform any updates." for (( i = i ; i < ${#casks[@]} ; i++ )); do current="$(brew cask info ${casks[$i]} | sed -n '1p' | sed -n 's/^.*: \(.*\)$/\1/p')" installed=( $(ls /opt/homebrew-cask/Caskroom/${casks[$i]})) if (! [[ " ${installed[@]} " == *" $current "* ]]); then casks[$i]="${casks[$i]}$(tput sgr0)$(tput setaf 2) ✔$(tput sgr0)" fi done echo " ${casks[@]/%/$'\n'}" | column fi 我现在还不清楚 brew cask 如何识别对系统不兼容的 app ,这个命令会不会更新至不兼容版本。我准备出现有不兼容的版本时再移回 application ,反正 app 相关的文档都是一致的。 最后要说明的是我只有 mas 找不到的 app 才用 brew cask ,因为我懒及对未经过审核 app 的不信任。 |
6
abao00001 2016-05-06 07:06:53 +08:00
brew cask 安装的 app 通过 app 自动升级又安装回 application 里面了。旧版本可以手动拖到 trash 。所以说 brew cask 只是简化了安装过程,其他什么也没有做。甚至只是运行 brew cask uninstall 同把 app 直接拖进 trash 一样,相关配置文档并没有删除。所以我建议还是使用辅助 app 删除。简单说就是以前怎么用这个还是怎么用,只是安装和更新可以偷一下懒。
|
7
hackpro 2016-05-06 16:23:44 +08:00
@abao00001
对 我也一直有这个疑惑 用 brew cask 安装的应用 再用 update && upgrade 去升级的时候重来没有提示过升级 只有每次打开应用手动点击更新检查的时候才会弹出升级提示 |
8
abao00001 2016-05-06 19:59:09 +08:00 via iPad
@hackpro brew cask 的作者本意只是简化安装, app 内有自动升级,升级后 brew cask 安装的旧版本直接删掉就好了。
|
10
abao00001 2016-05-06 22:14:58 +08:00
@hackpro 上面不是贴出来了吗。那个码简单说是:检查有没有可更新版本,没有可更新版本的 app 跳过,有可更新的安装更新,然后清除旧版本清除缓存。我觉得这个是我目前在网上看到过的写的比较好的,所以我一直用的这个。我发现国内 brew cask 使用率不高是因为网络问题,下载慢的不行,连这些 app 的网站都是被屏蔽的。
|
11
hackpro 2016-05-06 22:48:55 +08:00
@abao00001 感谢,刚刚没注意到
运行之后总是出现 command not found 提示,不止可否帮忙看下 ``` nspecting 47 casks. Use 'brew-cask.sh upgrade' to perform any updates. ./update_brew_cask: line 19: [[ 6.1 ==: command not found ./update_brew_cask: line 19: [[ 10.05 ==: command not found ./update_brew_cask: line 19: [[ 1.1 ==: command not found ./update_brew_cask: line 19: [[ 5.0.2 ==: command not found ./update_brew_cask: line 19: [[ 2.4.0 ==: command not found ./update_brew_cask: line 19: [[ 2.8.3_435 ==: command not found ./update_brew_cask: line 19: [[ 2.4 ==: command not found ./update_brew_cask: line 19: [[ 2.0.7 ==: command not found ./update_brew_cask: line 19: [[ 1.62 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 3.11.4 ==: command not found ./update_brew_cask: line 19: [[ 1.2.3 ==: command not found ./update_brew_cask: line 19: [[ 2016.1 ==: command not found ./update_brew_cask: line 19: [[ 2.1.1 ==: command not found ./update_brew_cask: line 19: [[ 3.2.3 ==: command not found ./update_brew_cask: line 19: [[ 2.8.9 ==: command not found ./update_brew_cask: line 19: [[ 1.5.2.4 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 1.6.0 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 36.6 ==: command not found ./update_brew_cask: line 19: [[ 4.2.13332 ==: command not found ./update_brew_cask: line 19: [[ 2.3 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 5.11 ==: command not found ./update_brew_cask: line 19: [[ 2.1.4 ==: command not found ./update_brew_cask: line 19: [[ 1.0.4 ==: command not found ./update_brew_cask: line 19: [[ 3.6.3 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 2.4.623 ==: command not found ./update_brew_cask: line 19: [[ 2.5 ==: command not found ./update_brew_cask: line 19: [[ 3.4.3,458 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 2016.1 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 2.7 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 1.7.26 ==: command not found ./update_brew_cask: line 19: [[ 514.0-1456193896 ==: command not found ./update_brew_cask: line 19: [[ 2.0-beta.9 ==: command not found ./update_brew_cask: line 19: [[ 2.3.4-305-ab500cf4 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 5.0.16-105871 ==: command not found ./update_brew_cask: line 19: [[ 3.5.1 ==: command not found ./update_brew_cask: line 19: [[ latest ==: command not found ./update_brew_cask: line 19: [[ 2015.12.14 ==: command not found ./update_brew_cask: line 19: [[ 2.7.8 ==: command not found |
12
abao00001 2016-05-07 00:29:33 +08:00 1
@hackpro 哦对了。~/bin 缺少 brew-cask.sh upgrade...装太久我忘记了, sorry 。。。
$ curl -L https://raw.githubusercontent.com/eduncan911/dotfiles/master/bin/brew-cask.sh --create-dirs -o ~/bin/brew-cask.sh $ chmod 755 ~/bin/brew-cask.sh 你再试试。 |
13
abao00001 2016-05-07 00:38:42 +08:00
@hackpro 是在~/bin 里添加 brew-cask.sh 。 可以以这两种方式使用:
$ brew-cask.sh $ brew-cask.sh upgrade 你先添加,再运行上面的 code ,调动 bin 里的 brew-cask.sh 应该就没有问题了 |
14
hackpro 2016-05-07 11:31:53 +08:00
|
15
hackpro 2016-05-10 10:41:04 +08:00
|
16
abao00001 2016-05-17 23:33:41 +08:00
@hackpro 我已经移回 application 了。我发现 brew cask 更新版本落后于应用内更新。而且这个 script 是把可更新版本下载,包括系统不兼容版本。我还是感觉 brew cask 只适合快速安装。
|
17
netabare 2016-05-24 02:51:32 +08:00 via iPhone 1
跑个题, brew cask 几乎都没怎么用……想安装几个常见的 GUI 软件都搜不到…
|