Created
February 14, 2014 15:17
-
-
Save ngerakines/9002823 to your computer and use it in GitHub Desktop.
update-git.sh
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/sh | |
| parent=${PWD##*/} | |
| if [ -f 'repos' ] | |
| then | |
| echo "`repos` file exists." | |
| for i in `cat repos`; do | |
| if [ -d $i ] | |
| then | |
| echo "repository $i has been cloned locally" | |
| cd $i | |
| git fetch --all | |
| git pull --rebase | |
| cd ../ | |
| else | |
| echo "repository $i has not been cloned locally" | |
| git clone ssh://[email protected]:7999/$parent/$i.git | |
| fi | |
| done | |
| else | |
| echo "`repos` file does not exist." | |
| fi |
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
| ht-activemq-cookbook | |
| ht-ant-cookbook | |
| ht-build-cookbook | |
| ht-cassandra-cookbook | |
| ht-cassandra-client-cookbook | |
| ht-common-cookbook | |
| ht-hfs-cookbook | |
| ht-java-cookbook | |
| ht-jsvc-cookbook | |
| ht-maven-cookbook | |
| ht-nginx-cookbook | |
| ht-preview-cookbook | |
| ht-psp-cookbook | |
| ht-rabbitmq-cookbook | |
| ht-tomcat-cookbook | |
| ht-varnish-cookbook | |
| ht-workspace-cookbook | |
| ht-yum-cookbook |
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
| 11615-MBP15:cb nick.gerakines$ pwd | |
| /Users/nick.gerakines/projects/ht/cb | |
| 11615-MBP15:cb nick.gerakines$ ~/bin/update-git.sh | |
| /Users/nick.gerakines/bin/update-git.sh: line 7: repos: command not found | |
| file exists. | |
| repository ht-activemq-cookbook has been cloned locally | |
| Fetching origin | |
| Current branch master is up to date. | |
| repository ht-ant-cookbook has been cloned locally | |
| Fetching origin | |
| Current branch master is up to date. | |
| repository ht-build-cookbook has been cloned locally | |
| Fetching origin | |
| Current branch master is up to date. | |
| repository ht-cassandra-cookbook has been cloned locally | |
| Fetching origin | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment