Last active
January 19, 2017 04:45
-
-
Save hideki-a/501c84c1f694ab20759dc1c0e122da9f to your computer and use it in GitHub Desktop.
ワンクリックでCocoapodsのインストールから依存ライブラリのインストールまでを行う
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
gem which cocoapods 2> /private/tmp/result_which_cocoapods | |
result=$(</private/tmp/result_which_cocoapods) | |
if echo "$result" | grep -q "Can't"; then | |
echo 'Cocoapods not installed.' | |
echo 'Install Cocoapods.' | |
echo '"Password"の表示が出たら、ログインのパスワードを入力してください。' | |
sudo gem install cocoapods | |
: | |
else | |
echo 'Cocoapods installed.' | |
fi | |
echo 'Install dependency.' | |
appdir="$(dirname "$BASH_SOURCE")" | |
cd ${appdir%/cocoapods.command} | |
pod install | |
rm -rf /private/tmp/result_which_cocoapods |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment