set git user/email if its not set

This commit is contained in:
Alex Grintsvayg 2017-01-18 15:57:34 -05:00
parent 81be65703a
commit 4cdf12a169

View file

@ -28,6 +28,15 @@ cmd_exists() {
}
GITUSERNAME=$(git config --global --get user.name)
GITEMAIL=$(git config --global --get user.email)
if [ -z "$GITUSERNAME" ]; then
git config --global user.name "$(whoami)"
fi
if [ -z "$GITEMAIL" ]; then
git config --global user.email "$(whoami)@lbry.io"
fi
if $LINUX; then
INSTALL="$SUDO apt-get install --no-install-recommends -y"