Help us understand the problem. What is going on with this article?

Xcodeのライセンス同意をコマンドラインだけで切り抜ける

More than 3 years have passed since last update.

Xcodeをアップデートした後、Homebrewを使おうとしたら、ライセンスに同意してないやんけボケェと怒られた。

毎度毎度、同意するためだけにXcodeを立ち上げるという苦行を強いられてきてウンザリしていたので、もうちょっと楽できないかな〜と調べたら、コンソール上でできることを知ったのでメモ。

作業手順

コンソールでおもむろにコマンドを叩く。

$ sudo xcodebuild -license


You have not agreed to the Xcode license agreements. 
You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at 
'/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

Enterを押せと言ってくるので、素直に押す。

すると長い規約が出てくる。スペースを押しながら読み進める。

あんまり良くないが、手を抜きたければ、q を押せばいきなり同意するか聞いてくれる。

Apple Inc.

Xcode and Apple SDKs Agreement

PLEASE SCROLL DOWN AND READ ALL OF THE FOLLOWING TERMS AND 
CONDITIONS CAREFULLY BEFORE USING THE APPLE SOFTWARE OR APPLE SERVICES.  
THIS IS A LEGAL AGREEMENT BETWEEN YOU AND APPLE.  
IF YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS, 
CLICK THE “AGREE” BUTTON. 

・・・・・・

Software License Agreements Press 'space' for more, or 'q' to quit

で、 agree と入力。

・・・・・・

By typing 'agree' you are agreeing to the terms of the software license agreements. 
Type 'print' to print them or anything else to cancel, 
[agree, print, cancel] agree

You can view the license agreements in Xcode's About Box, or at 
/Applications/Xcode.app/Contents/Resources/English.lproj/Licens.rtf

これで無事、Homebrewが使えるようになった。

まったく、やれやれだぜ。

crowdworks
21世紀の新しいワークスタイルを提供する日本最大級のクラウドソーシング「クラウドワークス」のエンジニアチームです!
https://crowdworks.co.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした