Skip to content

Commit

Permalink
remove default username/email
Browse files Browse the repository at this point in the history
  • Loading branch information
atomantic committed May 24, 2016
1 parent 4fb689a commit 1ee422a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[user]
name = Adam Eivy
email = [email protected]
name = GITHUBFULLNAME
email = GITHUBEMAIL
[github]
# https://github.com/blog/180-local-github-config
user = atomantic
user = GITHUBUSER

# in a few months, look into the include directive (after bug fixes)
token = MOVEALONG
Expand Down
3 changes: 2 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.dotfiles/oh-my-zsh
POWERLEVEL9K_MODE='awesome-patched'
# if you want to use this, change your non-ascii font to Droid Sans Mono for Awesome
# POWERLEVEL9K_MODE='awesome-patched'
export ZSH_THEME="powerlevel9k/powerlevel9k"
# https://github.com/bhilburn/powerlevel9k#customizing-prompt-segments
# https://github.com/bhilburn/powerlevel9k/wiki/Stylizing-Your-Prompt
Expand Down
22 changes: 9 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,38 +61,34 @@ else
fi

if [[ $response =~ ^(no|n|N) ]];then
read -r -p "What is your email? [$DEFAULT_EMAIL] " email
read -r -p "What is your email? " email
if [[ ! $email ]];then
email=$DEFAULT_EMAIL
error "you must provide an email to configure .gitconfig"
exit 1;
fi
fi

grep 'user = atomantic' .gitconfig
if [[ $? = 0 ]]; then
read -r -p "What is your github.com username? [$DEFAULT_GITHUBUSER]" githubuser
fi
if [[ ! $githubuser ]];then
githubuser=$DEFAULT_GITHUBUSER
fi

running "replacing items in .gitconfig with your info ($COL_YELLOW$fullname, $email, $githubuser$COL_RESET)"

# test if gnu-sed or osx sed

sed -i "s/$DEFAULT_NAME/$firstname $lastname/" .gitconfig > /dev/null 2>&1 | true
sed -i "s/GITHUBFULLNAME/$firstname $lastname/" .gitconfig > /dev/null 2>&1 | true
if [[ ${PIPESTATUS[0]} != 0 ]]; then
echo
running "looks like you are using OSX sed rather than gnu-sed, accommodating"
sed -i '' "s/$DEFAULT_NAME/$firstname $lastname/" .gitconfig;
sed -i '' 's/'$DEFAULT_EMAIL'/'$email'/' .gitconfig;
sed -i '' 's/'$DEFAULT_GITHUBUSER'/'$githubuser'/' .gitconfig;
sed -i '' 's/'$DEFAULT_USERNAME'/'$(whoami)'/g' .zshrc;ok
sed -i '' "s/GITHUBFULLNAME/$firstname $lastname/" .gitconfig;
sed -i '' 's/GITHUBEMAIL/'$email'/' .gitconfig;
sed -i '' 's/GITHUBUSER/'$githubuser'/' .gitconfig;
else
echo
bot "looks like you are already using gnu-sed. woot!"
sed -i 's/'$DEFAULT_EMAIL'/'$email'/' .gitconfig;
sed -i 's/'$DEFAULT_GITHUBUSER'/'$githubuser'/' .gitconfig;
sed -i 's/'$DEFAULT_USERNAME'/'$(whoami)'/g' .zshrc;ok
sed -i 's/GITHUBEMAIL/'$email'/' .gitconfig;
sed -i 's/GITHUBUSER/'$githubuser'/' .gitconfig;
fi

# read -r -p "OK? [Y/n] " response
Expand Down
2 changes: 1 addition & 1 deletion osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ running "Make iTerm2 load new tabs in the same directory"
/usr/libexec/PlistBuddy -c "set \"New Bookmarks\":0:\"Custom Directory\" Recycle" ~/Library/Preferences/com.googlecode.iterm2.plist
running "setting fonts"
defaults write com.googlecode.iterm2 "Normal Font" -string "Hack-Regular 12";
defaults write com.googlecode.iterm2 "Non Ascii Font" -string "DroidSansMonoAwesome 12";
defaults write com.googlecode.iterm2 "Non Ascii Font" -string "RobotoMonoForPowerline-Regular 12";
ok
running "reading iterm settings"
defaults read -app iTerm;
Expand Down

0 comments on commit 1ee422a

Please sign in to comment.