Lcarr has submitted this change and it was merged.

Change subject: Add the standard git-setup for wikimedia. (With appropriate 
tweaks.)
......................................................................


Add the standard git-setup for wikimedia. (With appropriate tweaks.)

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

Approvals:
  Lcarr: Verified; Looks good to me, approved



diff --git a/git-setup b/git-setup
new file mode 100755
index 0000000..5f6411c
--- /dev/null
+++ b/git-setup
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Basic setup for the software 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 --global user.email "$email"
+git config --global user.name "$name"
+
+# Setup remotes/aliases
+git remote add ircecho 
ssh://[email protected]:29418/operations/debs/ircecho
+git config alias.push-for-review "push ircecho 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/53277
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c2514855ea9751a24c633cbe14f29bb5c88e536
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/ircecho
Gerrit-Branch: master
Gerrit-Owner: pugmajere <[email protected]>
Gerrit-Reviewer: Lcarr <[email protected]>

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

Reply via email to