File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -382,20 +382,4 @@ if ! test "$HOME/.oh-my-zsh/"; then
382382 sh /tmp/install-oh-my-zsh.sh
383383fi
384384
385-
386- if ! git config --get user.email; then
387- # Git commit config
388- printf ' Name for git commits (ie. John Foo): '
389- read GIT_NAME
390- printf ' Email for git commits (john.foo@example.com): '
391- read GIT_EMAIL
392-
393- # Configure git
394- printf " Set git config to use %s <%s>? [y/n]: " " $GIT_NAME " " $GIT_EMAIL "
395- read reply
396- if [[ $reply =~ ^[Yy]$ ]]
397- then
398- git config --global user.name " $GIT_NAME "
399- git config --global user.email " $GIT_EMAIL "
400- fi
401- fi
385+ ~ /bin/setup-git-user.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ if ! git config --get user.email; then
6+ # Git commit config
7+ printf ' Name for git commits (ie. John Foo): '
8+ read GIT_NAME
9+ printf ' Email for git commits (john.foo@example.com): '
10+ read GIT_EMAIL
11+
12+ # Configure git
13+ printf " Set git config to use %s <%s>? [y/n]: " " $GIT_NAME " " $GIT_EMAIL "
14+ read reply
15+ if [[ $reply =~ ^[Yy]$ ]]
16+ then
17+ git config --global user.name " $GIT_NAME "
18+ git config --global user.email " $GIT_EMAIL "
19+ fi
20+ fi
You can’t perform that action at this time.
0 commit comments