initial commit

This commit is contained in:
silvernode 2016-01-29 05:12:16 -07:00
parent 01cd5e8c40
commit 474d2d9f62

56
Bash Scripts/git_config.sh Executable file
View File

@ -0,0 +1,56 @@
#!/bin/bash
echo " ==============="
echo "| Git Config |"
echo " ==============="
echo
echo -n "Global config or local? (g/l): "
read location
echo
echo "The following will be displayed in your commits..."
echo -n "E-mail Address: "
read email
echo -n "Username: "
read name
echo
if [ "${location}" = "g" ];then
echo "Review for global config:"
echo
echo "Email Address: ${email}"
echo "Username: ${name}"
echo
echo -n "Are these settings correct? (y/n): "
read confirm
if [ "${confirm}" = "n" ];then
echo
echo "Setup Cancelled...re-run to start over"
exit 0;
else
git config --global user.email ${email}
git config --global user.name ${name}
echo
echo "Saved global config"
exit 0;
fi
elif [ "${location}" = "l" ];then
echo "Review for local config:"
echo
echo "Email Address: ${email}"
echo "Username: ${name}"
echo
echo -n "Are these settings correct? (y/n): "
read confirm
if [ "${confirm}" = "n" ];then
echo
echo "Setup Cancelled...re-run to start over"
exit 0;
else
git config user.email ${email}
git config user.name ${name}
echo
echo "Saved local config"
exit 0;
fi
fi