-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit.sh
executable file
·30 lines (25 loc) · 1.05 KB
/
git.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# ##############################################################################
# This script is used to configure git and clone my configs repository.
# (Obviously git and SSH keys must already be in their appropriate places.)
# (And this will have to be run separately from the other things...)
# ##############################################################################
# Make sure git is installed (just in case i forget...)
hash git 2>&- || {
echo >&2 "\033[1;31mError:\033[0m"\
"git is required but does not appear to be installed.";
exit 1; }
# Make sure SSH is configured (just in case i forget...)
if [ ! -f ~/.ssh/id_dsa ]
then
echo "\033[1;31mError:\033[0m"\
"SSH must be configured first."
exit 1
fi
# Configure git
git config --global user.name "kine"
git config --global user.email "kine@stupidkitties.com"
# Create dev folder if it doesn't exist, then clone the repository into it
mkdir -p ~/Development
git clone git@github.com:ohkine/configs.git ~/Development/configs
# Open the repository directory in Finder
open ~/Development/configs