Skip to content

Instantly share code, notes, and snippets.

@pcdavid
Forked from cbrun/get-eclipse-sources.sh
Last active October 13, 2015 03:58
Show Gist options
  • Save pcdavid/4135601 to your computer and use it in GitHub Desktop.
Save pcdavid/4135601 to your computer and use it in GitHub Desktop.
A quick (and dirty) script to clone all the repositories listed on git.eclipse.org
#!/bin/sh
for offset in $(seq 0 50 650); do
lynx -dump "http://git.eclipse.org/c/?ofs=$offset" | egrep '^ +[0-9]+\. http://git.eclipse.org/.*.git/' | awk '{print $2}'
done | sort -u | grep -v 'www.eclipse.org' | sed -e 's%/c/%/gitroot/%' | while read repo; do
clear
if [ -d "$repo" ]; then
echo "Updating $repo..."
( cd $repo && git pull --ff-only )
else
echo "Cloning $repo..."
git clone $repo
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment