-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgit-setup
More file actions
executable file
·37 lines (32 loc) · 811 Bytes
/
git-setup
File metadata and controls
executable file
·37 lines (32 loc) · 811 Bytes
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
31
32
33
34
35
36
#!/bin/bash
GLOBAL_FLAG=
CONFIGURATION=work
for argval in "$@"
do
case "$argval" in
'global')
echo Setting config globally
GLOBAL_FLAG=--global
;;
'home')
CONFIGURATION=home
;;
'work')
CONFIGURATION=work
;;
esac
done
case "$CONFIGURATION" in
'home')
echo Configuring for home
git config $GLOBAL_FLAG user.name "Stephen H. Gerstacker"
git config $GLOBAL_FLAG user.email stephen@gerstacker.us
;;
*)
echo Configuring for work
git config $GLOBAL_FLAG user.name "Stephen H. Gerstacker"
git config $GLOBAL_FLAG user.email stephen@airsquirrels.com
;;
esac
git config $GLOBAL_FLAG user.name
git config $GLOBAL_FLAG user.email