-
-
Save borkweb/96c014184f1da9ea3516 to your computer and use it in GitHub Desktop.
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 | |
| ######################### | |
| # This bash script pulls the latest plugin code for whichever branch is checked out | |
| # | |
| # Optionally checks out a branch before pulling. | |
| # | |
| # Example: mtup develop | |
| ######################### | |
| repos=() | |
| repos+=('the-events-calendar') | |
| repos+=('events-pro') | |
| repos+=('events-community') | |
| repos+=('events-community-tickets') | |
| repos+=('events-eventbrite') | |
| repos+=('events-facebook') | |
| repos+=('events-filterbar') | |
| repos+=('events-importer-ical') | |
| repos+=('events-tickets-edd') | |
| repos+=('events-tickets-shopp') | |
| repos+=('events-tickets-woo') | |
| repos+=('events-tickets-wpec') | |
| for i in "${repos[@]}" | |
| do | |
| echo '-------------------' | |
| if [ -d $i ]; then | |
| echo $i | |
| cd $i | |
| if [ -n $1 ]; then | |
| git co $1 | |
| fi | |
| git pull | |
| [ -f .gitmodules ] && git submodule update --recursive --init | |
| cd ../ | |
| else | |
| echo "${i} doesn't exist in this directory. Perhaps you aren't in executing this from plugins?" | |
| fi | |
| done | |
| echo '-------------------' | |
| echo 'DONE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment