Created
July 25, 2012 14:43
-
-
Save sauthieg/3176527 to your computer and use it in GitHub Desktop.
Usage: clone-ow2-utilities.sh [--ssh]
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 | |
wget http://gitorious.ow2.org/ow2-utilities.xml | |
option=$1 | |
for tag in clone_url; do | |
repositories=`grep $tag ow2-utilities.xml \ | |
| tr -d [\ ] \ | |
| sed 's/^<.*>\([^<].*\)<.*>$/\1/'` | |
for repository in $repositories; do | |
echo | |
if [ "$option" = "--ssh" ]; then | |
# Transform :// into @ | |
developer=`echo $repository \ | |
| sed -e "s/:\/\//@/g" \ | |
| sed -e "s/org\/ow2/org:ow2/g"` | |
git clone $developer | |
else | |
# Default mode: non-developer | |
git clone $repository | |
fi | |
done | |
done |
chamerling
commented
Jul 25, 2012
via email
Yes, will be easier to manage multiple repositories like that
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment