Last active
          September 27, 2017 21:58 
        
      - 
      
- 
        Save eMdOS/84ed9973a30b66f73c737e4d4d12844e to your computer and use it in GitHub Desktop. 
    Carthage: update | bootstrap ... from bash
  
        
  
    
      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 | |
| 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 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Usage
Save the
carthage.shfile (wherever you want).In the
Terminalgo to the same location where theCartfileis. Once being there, callcarthage.shpassingupdateorbootstrapargument.