Jgreen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/173035

Change subject: add gerrit setup script for convenience
......................................................................

add gerrit setup script for convenience

Change-Id: I6f4dc7bc91bd7177fee06c6c0d85501bebee2b8f
---
A git-setup
1 file changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/35/173035/1

diff --git a/git-setup b/git-setup
new file mode 100755
index 0000000..1a5deb9
--- /dev/null
+++ b/git-setup
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Basic setup for the puppet git repository
+
+# Need this info
+echo "Type your labs console wiki username (ie: test user):"
+read name
+echo "Type your shell username (ie: testuser):"
+read username
+echo "Type the e-mail address for this username:"
+read email
+
+# Global config
+git config user.email "$email"
+git config user.name "$name"
+
+# Setup remotes/aliases
+git remote add puppet ssh://[email protected]:29418/operations/dns
+git config alias.push-for-review-master "push puppet HEAD:refs/for/master"
+
+TOPLEVEL=`git rev-parse --show-toplevel`
+which curl
+if [ "$?" == "0" ]
+then
+       curl "https://gerrit.wikimedia.org/r/tools/hooks/commit-msg"; > 
$TOPLEVEL/.git/hooks/commit-msg && chmod u+x $TOPLEVEL/.git/hooks/commit-msg
+else
+       which wget
+       if [ "$?" == "0" ]
+       then
+               wget "https://gerrit.wikimedia.org/r/tools/hooks/commit-msg"; -O 
$TOPLEVEL/.git/hooks/commit-msg && chmod u+x $TOPLEVEL/.git/hooks/commit-msg
+       else
+               scp -p 29418 gerrit.wikimedia.org:hooks/commit-msg 
$TOPLEVEL/.git/hooks/commit-msg
+               if [ "$?" != "0" ]
+               then
+                       echo "Please download the commit message hook from 
https://gerrit.wikimedia.org/r/tools/hooks/commit-msg, place it in 
.git/hooks/commit-msg, and chmod u+x the file."
+               fi
+       fi
+fi

-- 
To view, visit https://gerrit.wikimedia.org/r/173035
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f4dc7bc91bd7177fee06c6c0d85501bebee2b8f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Jgreen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to