forked from jeffheifetz/jeffheifetz-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_profile
123 lines (104 loc) · 3.87 KB
/
.bash_profile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
export PATH=/usr/local/bin:/usr/local/sbin:$HOME/bin:$PATH
#**************************showing git branches in bash prompt***********************************
function is_in_git {
[ -d ".git" ] || git rev-parse --git-dir &> /dev/null
}
function is_git_dirty {
[[ -n $(git status -z 2>/dev/null) ]] && echo "*"
}
function parse_git_branch {
#Ensure this is not run in the webkit repo (takes too long)
if [[ $(basename "$PWD") != "webkit" ]] && is_in_git; then
local BRANCH=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD 2> /dev/null)
if [ "$BRANCH" == HEAD ]; then
BRANCH=$(git name-rev --name-only HEAD 2> /dev/null)
if [ -z "$BRANCH"]; then
BRANCH="??"
fi
fi
echo -n [$BRANCH$(is_git_dirty)]
fi
}
#*************************Git Completion*********************************************************
function proml {
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local YELLOW="\[\033[0;33m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
local LIGHT_PURPLE="\[\033[1;34m\]"
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="${TITLEBAR}\
$LIGHT_GREEN\w$YELLOW\$(parse_git_branch)\
\n$WHITE ⚡ "
PS2='> '
PS4='+ '
}
proml
# Set git autocompletion
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
. /usr/local/git/contrib/completion/git-completion.bash
fi
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
export TERM="xterm-256color"
##################################
# Put MacPorts after webkit changes to account for things like ctags
#################################
# MacPorts Installer addition on 2011-06-04_at_21:24:00: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
#################################
#For DoctorJS/jsctags integration
export NODE_PATH=/usr/local/lib/jsctags/:$NODE_PATH
#################################
#For ADT integration
export ADT=~/Coding/adt-bundle-mac-x86_64-20130219/sdk/
export PATH=${PATH}:$ADT/platform-tools:$ADT/tools
#################################
#For Maven
export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}
export MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=128m"
#################################
#For Ant
export ANT_HOME=/usr/local/ant
export PATH=${PATH}:${ANT_HOME}/bin
# New environment setting added by BB10 WebWorks SDK on Wed Sep 25 11:27:36 EDT 2013 1.
# The unmodified version of this file is saved in /Users/jheifetz/.bash_profile1013798494.
# Do NOT modify these lines; they are used to uninstall.
WEBWORKS_HOME="/Users/jheifetz/SDKs/webworks/BB10 WebWorks SDK 2.0.0.17"
export WEBWORKS_HOME
# End comments by InstallAnywhere on Wed Sep 25 11:27:36 EDT 2013 1.
# New environment setting added by BB10 WebWorks SDK on Wed Sep 25 11:27:36 EDT 2013 2.
# The unmodified version of this file is saved in /Users/jheifetz/.bash_profile1013798494.
# Do NOT modify these lines; they are used to uninstall.
PATH="${PATH}:$WEBWORKS_HOME"
export PATH
# End comments by InstallAnywhere on Wed Sep 25 11:27:36 EDT 2013 2.
#read -p "Would you like to setup bbndk? " -n 1
#if [[ $REPLY =~ ^[Yy]$ ]]; then
#Set a variable for the BBNDK locations
#export BBNDK=~/SDKs/bbndks/BB10.0.09-2222
#source /Applications/Momentics.app/bbndk-env_10_2_0_1155.sh
#fi
#read -p "Would you like to setup for webkit?" -n 1
#if [[ $REPLY =~ ^[Yy]$ ]]; then
#source ~/configureWebkit.sh
#fi
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
cd ~/Coding