Add check for user email and name setup
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 17 Dec 2011 04:51:26 +0000 (23:51 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 17 Dec 2011 04:51:26 +0000 (23:51 -0500)
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
contrib/git-to-steve.sh

index 55574db..88db014 100755 (executable)
@@ -1,5 +1,17 @@
 #!/bin/sh
 #
 # 
+USER_EMAIL=$(git config user.email)
+if [ -z "$USER_EMAIL" ]; then
+    echo "You need to setup your email address with:"
+    echo "    git config user.email <your email address>"
+    exit 1
+fi
+USER_NAME=$(git config user.name)
+if [ -z "$USER_NAME" ]; then
+    echo "You need to configure git with your name:"
+    echo "    git config user.name \"John Doe\""
+    exit 1
+fi
 git branch --track for-steve origin/master
 git checkout for-steve