Skip to content

Instantly share code, notes, and snippets.

@hashar
Created December 13, 2012 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hashar/4277475 to your computer and use it in GitHub Desktop.
Save hashar/4277475 to your computer and use it in GitHub Desktop.
#!/bin/bash
# You will need a file named 'gerrit-projects' containing the list of projects
# gerrit ls-projects > gerrit-projects
# The refs/meta/config file for each project is then downloaded. Slashes are
# replaced by dash and filename is suffixed with '.config'.
GITWEB="https://gerrit.wikimedia.org/r/gitweb?p=<PROJECT>.git;a=blob_plain;f=project.config;hb=refs/meta/config"
for project in `cat gerrit-projects`; do
echo "Checking out $project.."
URL_META_CONFIG=${GITWEB/<PROJECT>/$project}
OUT=$project.config
# Replace all slashes to dashes
OUT=${OUT//\//-}
wget --quiet -O $OUT $URL_META_CONFIG > /dev/null
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment