-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Myles Byrne
committed
Sep 5, 2014
1 parent
3e43b2b
commit 1bbe9cc
Showing
4 changed files
with
42 additions
and
32 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,9 @@ | ||
# We could also capture git usernames with something like | ||
# git config --global --get-all github.username | ||
echo "email:" $(git config --global --get user.email) | ||
|
||
# Grab pair names | ||
pair_names="$(git config --global user.name)" | ||
# exit unless the github.username field is set in the git conf | ||
git config --global --get github.username > /dev/null || exit | ||
|
||
# Store IFS to split string on custom character then restore IFS | ||
oIFS=$IFS; IFS='&'; names=($pair_names); IFS=$oIFS | ||
|
||
# Grab pair accounts | ||
pair_github="$(git config --global user.email | sed -e s/^.*\+// -e s/@.*$//)" | ||
github=(${pair_github//./ }) | ||
|
||
|
||
echo "pair:" | ||
echo " user-a:" | ||
echo " name:" "${names[0]}" | ||
echo " github:" "${github[0]}" | ||
echo " user-b:" | ||
echo " name:" "${names[1]}" | ||
echo " github:" "${github[1]}" | ||
echo "github_usernames:" | ||
git config --global --get-all github.username | while read github_username ; do | ||
echo "-" $github_username | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[user] | ||
email = [email protected] | ||
|
||
[github] | ||
username = bob | ||
username = jane |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# ensure we're in the parent directory of this file | ||
cd $(dirname $0)/.. | ||
|
||
# There's a .gitconfig file in this folder for this test so we pretend | ||
# this folder is $HOME causing git to read that config | ||
export HOME='./test' | ||
|
||
sh metadata/realtime/user.sh |