LoginSignup
15
15

More than 5 years have passed since last update.

新しくMacを買って最初に開発環境をセットアップする内容をスクリプトにまとめた話

Last updated at Posted at 2018-03-10

事始め

仕事ではmacをずっと使っていたが、使用PCが昔からWindowsで複数台あったので、macを買う機会がなかったのだが、流石に欲しくなって去年購入した際のセットアップのまとめになります。

セットアップの内容

iOSのアプリ開発ができればそれで十分なので、以下の環境(プラスα)を入れました。

スクリプトについて

これらの環境を導入するに当たって、毎回手動で入れるのは面倒だったので、一括で入るようにしたくて調べ回って以下のスクリプトにまとめました。

#!/bin/sh
# setup mac

# HomeBrew
# see https://brew.sh/index_ja.html
if [ ! -x "`which brew`" ]; then
  echo "start install and update brew"
  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  brew update
fi

# rbenv
# see https://github.com/rbenv/rbenv
if [ ! -x "`which rbenv`" ]; then
  echo "start install rbenv"
  brew install rbenv
fi

# Git
# see https://git-scm.com/downloads
if [ ! -x "`which git`" ]; then
  echo "start install git"
  brew install git
fi

# brew cask
# brew cask install sourcetree
# brew cask install visual-studio-code
# brew cask install google-chrome
# brew cask install java
# brew cask install android-studio

# mas (Mac App Store command line interface)
# if you need to install mas, remove comment out
# if [ ! -x "`which mas`" ]; then
#  echo "start install mas"
#  brew install mas
#
#  echo "install App Store Softwares"
#  mas install 497799835  # Xcode
#  mas install 896624060  # Kobito
#  mas install 1024640650 # CotEditor
# fi

使用しているコマンドについて

  • brew cask install:homebrewを入れるとついてくるコマンドです。アプリケーションのインストールができます。
  • mas:App Storeのアプリをコマンドからインストールできるシステムです。brewからinstallできます。詳細はGitHub参照のこと

参考にした記事

スクリプトについて

一応GitHub上で公開してあります。xcodeのプロジェクトの初期セットアップ用のスクリプトも配置してありますので、興味がある方はご参照ください。

15
15
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
15
15