Skip to content
This repository
Browse code

java bash settings

  • Loading branch information...
commit f21620aa780a0ee831a2acc1176bd337643e9898 1 parent 034cf15
Gabriel Adomnicai authored July 16, 2011

Showing 2 changed files with 40 additions and 19 deletions. Show diff stats Hide diff stats

  1. 27  .bash_profile
  2. 32  .bashrc
27  .bash_profile
@@ -8,14 +8,19 @@ fi
8 8
 
9 9
 # paths
10 10
 # --------------------------------------------------------------------------------
  11
+export JUNIT_HOME=/Developer/junit4.8.2
  12
+export ANT_HOME=/usr/share/java/ant-1.8.2
  13
+export CLASSPATH=$JUNIT_HOME/junit-4.8.2.jar:$JUNIT_HOME
11 14
 export PATH=$HOME/.local/bin:$HOME/.local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin$(cat /etc/paths.d/* | sed 's/^/:/g' | tr -d '\n')
12 15
 export MANPATH=$HOME/.local/share/man:/usr/local/share/man:/usr/share/man$(cat /etc/paths.d/* | sed 's/^/:/g' | tr -d '\n')
13 16
 
  17
+PATH="$PATH:$JUNIT_HOME"
14 18
 PATH="$PATH:/usr/local/mysql/bin:/opt/local/bin"
15 19
 PATH="$PATH:/Applications/SenchaSDKTools-1.1"
16 20
 PATH="$PATH:/Applications/SenchaSDKTools-1.1/command"
17 21
 PATH="$PATH:/Applications/SenchaSDKTools-1.1/appbuilder"
18 22
 PATH="$PATH:/Applications/SenchaSDKTools-1.1/jsbuilder"
  23
+
19 24
 MANPATH=$MANPATH:/opt/local/share/man
20 25
 INFOPATH=$INFOPATH:/opt/local/share/info
21 26
 
@@ -51,11 +56,11 @@ export HISTFILESIZE=409600
51 56
 export HISTIGNORE='history:&:ls:ll:la:[bf]g:h:exit:clear'
52 57
 export HISTSIZE=100000
53 58
 
54  
-# grep colours
  59
+# grep colors
55 60
 # ------------------------------------------------------------------------------
56 61
 [[ "$TERM" != 'dumb' ]] && {
57  
-  export GREP_OPTIONS="--color=auto"
58  
-  export GREP_COLOR="37;45"
  62
+export GREP_OPTIONS="--color=auto"
  63
+export GREP_COLOR="37;45"
59 64
 }
60 65
 
61 66
 # editor
@@ -66,14 +71,14 @@ elif [[ $platform == 'mac' ]]; then
66 71
   export EDITOR='/usr/local/bin/vim'
67 72
 fi
68 73
 
69  
-# termcap colours
  74
+# termcap colors
70 75
 # ------------------------------------------------------------------------------
71 76
 [[ "$TERM" != 'dumb' ]] && {
72  
-  export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
73  
-  export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
74  
-  export LESS_TERMCAP_me=$'\E[0m' # end mode
75  
-  export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
76  
-  export LESS_TERMCAP_so=$'\E[00;47;30m' # begin standout-mode
77  
-  export LESS_TERMCAP_ue=$'\E[0m' # end underline
78  
-  export LESS_TERMCAP_us=$'\E[01;32m' # begin underline
  77
+export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
  78
+export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
  79
+export LESS_TERMCAP_me=$'\E[0m' # end mode
  80
+export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
  81
+export LESS_TERMCAP_so=$'\E[00;47;30m' # begin standout-mode
  82
+export LESS_TERMCAP_ue=$'\E[0m' # end underline
  83
+export LESS_TERMCAP_us=$'\E[01;32m' # begin underline
79 84
 }
32  .bashrc
@@ -121,6 +121,9 @@ alias df='df -h'
121 121
 alias untar='tar -xvzf'
122 122
 alias suntar='sudo tar -xvzf'
123 123
 
  124
+# jar (view jar contents)
  125
+alias vjar='jar -tvf'
  126
+
124 127
 # sudo unzip
125 128
 alias sunzip='sudo unzip'
126 129
 alias sbunzip2='sudo bunzip2'
@@ -135,6 +138,27 @@ alias ver='cat /etc/redhat-release'
135 138
 # list all colors
136 139
 alias colors="set | egrep '^COLOR_\w*'"
137 140
 
  141
+# --------------------------------------------------------------------------------
  142
+# ant colors
  143
+# --------------------------------------------------------------------------------
  144
+function antf() {
  145
+RED=`echo -e '\033[1;41m\033[37m'`
  146
+GREEN=`echo -e '\033[1;42m\033[37m'`
  147
+NC=`echo -e '\033[0m'`
  148
+
  149
+$ANT_HOME/bin/ant -logger org.apache.tools.ant.listener.AnsiColorLogger "$@" \
  150
+  | perl -pe 's/(?<=\e\[)2;//g' \
  151
+  | sed \
  152
+  -e "s/\(FAILED\)/$RED\1$NC/" \
  153
+  -e "s/\(.*Failures: [123456789].*\)/$RED\1$NC/" \
  154
+  -e "s/\(.*Errors: [123456789].*\)/$RED\1$NC/" \
  155
+  -e "s/\(.*Failures: 0, Errors: 0.*\)/$GREEN\1$NC/"
  156
+}
  157
+alias ant=antf
  158
+
  159
+# --------------------------------------------------------------------------------
  160
+# bookmarks
  161
+# --------------------------------------------------------------------------------
138 162
 # save bookmarks to folders
139 163
 # save x = bookmarks the current directory as x
140 164
 # cd x = navigates to the bookmarked path
@@ -233,11 +257,3 @@ echo -e "${COLOR_BROWN}`bash --version`"
233 257
 echo -ne "${COLOR_BG_CYAN}${COLOR_GRAY}uptime: "; uptime
234 258
 echo -ne "${COLOR_BG_CYAN}${COLOR_GRAY}server time is: "; date
235 259
 echo -ne "${COLOR_NC}"
236  
-
237  
-export PATH=/Applications/SenchaSDKTools-1.1:$PATH
238  
-
239  
-export PATH=/Applications/SenchaSDKTools-1.1/command:$PATH
240  
-
241  
-export PATH=/Applications/SenchaSDKTools-1.1/jsbuilder:$PATH
242  
-
243  
-export PATH=/Applications/SenchaSDKTools-1.1/appbuilder:$PATH

0 notes on commit f21620a

Please sign in to comment.
Something went wrong with that request. Please try again.