Skip to content

Instantly share code, notes, and snippets.

@eMdOS
Last active September 27, 2017 21:58
Show Gist options
  • Select an option

  • Save eMdOS/84ed9973a30b66f73c737e4d4d12844e to your computer and use it in GitHub Desktop.

Select an option

Save eMdOS/84ed9973a30b66f73c737e4d4d12844e to your computer and use it in GitHub Desktop.
Carthage: update | bootstrap ... from bash
#!/bin/bash
update="update"
bootstrap="bootstrap"
expectation_message="EXPECTED: [ $update | $bootstrap ]"
if [ $# -eq 0 ]; then
echo "ERROR: No argument supplied."
echo $expectation_message
elif [ $# -eq 1 ] && ([ "$1" == update ] || [ "$1" == bootstrap ]) ; then
carthage $1 --platform iOS --no-use-binaries
elif [ $# -ne 1 ]; then
echo "ERROR: Too many arguments (count=$#)."
echo $expectation_message
else
echo "ERROR: '$1' is not a valid argument."
echo $expectation_message
fi
@eMdOS

eMdOS commented Sep 27, 2017

Copy link
Copy Markdown
Author

Usage

  1. Save the carthage.sh file (wherever you want).

  2. In the Terminal go to the same location where the Cartfile is. Once being there, call carthage.sh passing update or bootstrap argument.

    ./scripts/carthage.sh bootstrap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment