Created
October 15, 2014 10:22
-
-
Save viktorbenei/2031e94eda244f038d85 to your computer and use it in GitHub Desktop.
Upgrade CocoaPods on Bitrise
This file contains hidden or 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/bash | |
# | |
# Prints the given command, then executes it | |
# Example: print_and_do_command echo 'hi' | |
# | |
function print_and_do_command { | |
echo " -> $ $@" | |
$@ | |
} | |
# | |
# Print the given command, execute it | |
# and exit if error happened | |
function print_and_do_command_exit_on_error { | |
print_and_do_command $@ | |
if [ $? -ne 0 ]; then | |
echo " [!] Failed!" | |
exit 1 | |
fi | |
} | |
echo "-- Updating CocoaPods --" | |
print_and_do_command_exit_on_error gem install cocoapods | |
print_and_do_command_exit_on_error pod setup | |
echo "-- DONE --" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment