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
@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