-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup
More file actions
executable file
·39 lines (35 loc) · 1.07 KB
/
Copy pathsetup
File metadata and controls
executable file
·39 lines (35 loc) · 1.07 KB
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
37
38
39
#!/bin/bash
# setup script to link to the new bash profile
# created by Ronald Jerez Ronald Jerez (github.com/ronaldjerez)
# the new profile is already setup
(($_COMMON_PROFILE_SET_)) && {
echo -e "\033[0;91m\n\nYour bash profile is already setup, exiting\n\n\033[0m"
exit
}
# location to script
profileScript="$(pwd)/profile.bash"
# the code to prepend to the .bash_profile
code="\\
# Available GIT PROMPT options\\
GIT_PROMPT_SHOW_DIRTY=1\\
GIT_PROMPT_SHOW_STASH=1\\
GIT_PROMPT_SHOW_AHEAD=1\\
GIT_PROMPT_SHOW_BEHIND=1\\
\\
# You can also change the default colors\\
# GIT_PROMPT_CLEAN_COLOR=green\\
# GIT_PROMPT_DIRTY_COLOR=red\\
# GIT_PROMPT_AHEAD_COLOR=\"light cyan\"\\
# GIT_PROMPT_BEHIND_COLOR=\"light black\"\\
\\
# SHOW_NODE_VERSION=1\\
\\
if [ -f $profileScript ]; then\\
source $profileScript\\
fi\\
"
# add the hash bang to the code if its a new profile
[ ! -f ~/.bash_profile ] && code="#!/bin/bash\n$code"
# append the code to the bash profile
echo -ne "${code}" | tr -d "\\" >> ~/.bash_profile
echo -e "\033[0;92m\n\nSetup complete, restart your terminal instance.\n\n\033[0m"