Created
July 11, 2012 19:21
-
-
Save hashar/3092560 to your computer and use it in GitHub Desktop.
script to clone MediaWiki extensions from Gerrit easily
This file contains 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/bash | |
# | |
# Lame script to easily clone a MediaWiki extension from Gerrit to current dir | |
# | |
# License: GPLv2 | |
# Author : Antoine "hashar" Musso | |
REMOTE_NAME="gerrit" | |
REMOTE_PATTERN="ssh://hashar@gerrit.wikimedia.org:29418/mediawiki/extensions/\$1.git" | |
if [ $# -ne 1 ] | |
then | |
echo "Usage: `basename $0` <ext name>" | |
exit 1; | |
fi | |
REMOTE_URL=${REMOTE_PATTERN/\$1/$1} | |
echo "Cloning as $REMOTE_NAME to $1" | |
echo "Using $REMOTE_URL" | |
git clone --origin $REMOTE_NAME $REMOTE_URL $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment