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 |
Can be abstracted to handle any gitorious project on OW2 ;)
Sure, I'll try to have that script refined and pushed into one of the OW2 Infra's own repository
Yes, I already pushed there some scripts/java code to ease old xwiki migration for Jeremy...
Should be easy with that script but do not manage see and script... Something like that will be cool:
ow2git.sh clone/pull PROJECT
That is: bulk clone / bulk "update" ?
I like that idea
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
For non developers (do not have push permissions):
>$ clone-ow2-utilities.sh
For Commiters (do have push permissions):
>$ clone-ow2-utilities.sh --ssh