Created
September 11, 2011 00:16
-
-
Save stephenyeargin/1208999 to your computer and use it in GitHub Desktop.
Update all subversion and git repositories in a projects directory
This file contains 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/sh | |
txtgrn=$(tput setaf 2) # Green | |
txtylw=$(tput setaf 3) # Yellow | |
txtblu=$(tput setaf 4) # Blue | |
txtpur=$(tput setaf 5) # Purple | |
txtcyn=$(tput setaf 6) # Cyan | |
txtwht=$(tput setaf 7) # White | |
txtrst=$(tput sgr0) # Text reset | |
cd /Library/WebServer/Documents | |
for X in `find . -maxdepth 2 -type d -name ".svn" | cut -d / -f 2`; do echo "${txtylw}[Updating $X ...]${txtrst}" ; svn update ./$X; done | |
for X in `find . -maxdepth 2 -type d -name ".git" | cut -d / -f 2`; do echo "${txtylw}[Updating $X ...]${txtrst}" ; cd $X ; git pull ; cd ..; done | |
cd /Library/WebServer/SymfonyProjects | |
for X in `find . -maxdepth 2 -type d -name ".svn" | cut -d / -f 2`; do echo "${txtylw}[Updating $X ...]${txtrst}" ; svn update ./$X; done | |
for X in `find . -maxdepth 2 -type d -name ".git" | cut -d / -f 2`; do echo "${txtylw}[Updating $X ...]${txtrst}" ; cd $X ; git pull ; cd ..; done | |
cd /Library/WebServer/RailsProjects | |
for X in `find . -maxdepth 2 -type d -name ".svn" | cut -d / -f 2`; do echo "${txtylw}[Updating $X ...]${txtrst}" ; svn update ./$X; done | |
for X in `find . -maxdepth 2 -type d -name ".git" | cut -d / -f 2`; do echo "${txtylw}[Updating $X ...]${txtrst}" ; cd $X ; git pull ; cd ..; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment