Skip to content

Instantly share code, notes, and snippets.

@hideki-a
Last active January 19, 2017 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hideki-a/501c84c1f694ab20759dc1c0e122da9f to your computer and use it in GitHub Desktop.
Save hideki-a/501c84c1f694ab20759dc1c0e122da9f to your computer and use it in GitHub Desktop.
ワンクリックでCocoapodsのインストールから依存ライブラリのインストールまでを行う
#!/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