LoginSignup
0
0

More than 5 years have passed since last update.

macOS(あるいはOS X)のバージョン毎にインストールするライブラリを分岐する

Posted at

やりたいこと

Sierra(ProductVersion 10.12以降)だったら cmd-eikana をインストール。
それ以前は karabiner をインストールする的なことをやりたい。

結論

osVersion=$(sw_vers -productVersion)

if [[ "$osVersion" =~ "10.12" ]]; then
  brew cask install cmd-eikana
else
  brew cask install karabiner
fi

参考

How to find out Mac OS X version from Terminal?

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0