Skip to content

Instantly share code, notes, and snippets.

@sauthieg
Created July 25, 2012 14:43
Show Gist options
  • Save sauthieg/3176527 to your computer and use it in GitHub Desktop.
Save sauthieg/3176527 to your computer and use it in GitHub Desktop.
Usage: clone-ow2-utilities.sh [--ssh]
#! /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
@sauthieg
Copy link
Author

For non developers (do not have push permissions):

>$ clone-ow2-utilities.sh

For Commiters (do have push permissions):

>$ clone-ow2-utilities.sh --ssh

@chamerling
Copy link

Can be abstracted to handle any gitorious project on OW2 ;)

@sauthieg
Copy link
Author

Sure, I'll try to have that script refined and pushed into one of the OW2 Infra's own repository

@chamerling
Copy link

chamerling commented Jul 25, 2012 via email

@sauthieg
Copy link
Author

Yes, I already pushed there some scripts/java code to ease old xwiki migration for Jeremy...

@chamerling
Copy link

Should be easy with that script but do not manage see and script... Something like that will be cool:

ow2git.sh clone/pull PROJECT

@sauthieg
Copy link
Author

That is: bulk clone / bulk "update" ?
I like that idea

@chamerling
Copy link

chamerling commented Jul 25, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment