Permalink
Browse files

java bash settings

  • Loading branch information...
1 parent 034cf15 commit f21620aa780a0ee831a2acc1176bd337643e9898 @gabesoft committed Jul 16, 2011
Showing with 40 additions and 19 deletions.
  1. +16 −11 .bash_profile
  2. +24 −8 .bashrc
View
@@ -8,14 +8,19 @@ fi
# paths
# --------------------------------------------------------------------------------
+export JUNIT_HOME=/Developer/junit4.8.2
+export ANT_HOME=/usr/share/java/ant-1.8.2
+export CLASSPATH=$JUNIT_HOME/junit-4.8.2.jar:$JUNIT_HOME
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')
export MANPATH=$HOME/.local/share/man:/usr/local/share/man:/usr/share/man$(cat /etc/paths.d/* | sed 's/^/:/g' | tr -d '\n')
+PATH="$PATH:$JUNIT_HOME"
PATH="$PATH:/usr/local/mysql/bin:/opt/local/bin"
PATH="$PATH:/Applications/SenchaSDKTools-1.1"
PATH="$PATH:/Applications/SenchaSDKTools-1.1/command"
PATH="$PATH:/Applications/SenchaSDKTools-1.1/appbuilder"
PATH="$PATH:/Applications/SenchaSDKTools-1.1/jsbuilder"
+
MANPATH=$MANPATH:/opt/local/share/man
INFOPATH=$INFOPATH:/opt/local/share/info
@@ -51,11 +56,11 @@ export HISTFILESIZE=409600
export HISTIGNORE='history:&:ls:ll:la:[bf]g:h:exit:clear'
export HISTSIZE=100000
-# grep colours
+# grep colors
# ------------------------------------------------------------------------------
[[ "$TERM" != 'dumb' ]] && {
- export GREP_OPTIONS="--color=auto"
- export GREP_COLOR="37;45"
+export GREP_OPTIONS="--color=auto"
+export GREP_COLOR="37;45"
}
# editor
@@ -66,14 +71,14 @@ elif [[ $platform == 'mac' ]]; then
export EDITOR='/usr/local/bin/vim'
fi
-# termcap colours
+# termcap colors
# ------------------------------------------------------------------------------
[[ "$TERM" != 'dumb' ]] && {
- export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
- export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
- export LESS_TERMCAP_me=$'\E[0m' # end mode
- export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
- export LESS_TERMCAP_so=$'\E[00;47;30m' # begin standout-mode
- export LESS_TERMCAP_ue=$'\E[0m' # end underline
- export LESS_TERMCAP_us=$'\E[01;32m' # begin underline
+export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
+export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
+export LESS_TERMCAP_me=$'\E[0m' # end mode
+export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
+export LESS_TERMCAP_so=$'\E[00;47;30m' # begin standout-mode
+export LESS_TERMCAP_ue=$'\E[0m' # end underline
+export LESS_TERMCAP_us=$'\E[01;32m' # begin underline
}
View
@@ -121,6 +121,9 @@ alias df='df -h'
alias untar='tar -xvzf'
alias suntar='sudo tar -xvzf'
+# jar (view jar contents)
+alias vjar='jar -tvf'
+
# sudo unzip
alias sunzip='sudo unzip'
alias sbunzip2='sudo bunzip2'
@@ -135,6 +138,27 @@ alias ver='cat /etc/redhat-release'
# list all colors
alias colors="set | egrep '^COLOR_\w*'"
+# --------------------------------------------------------------------------------
+# ant colors
+# --------------------------------------------------------------------------------
+function antf() {
+RED=`echo -e '\033[1;41m\033[37m'`
+GREEN=`echo -e '\033[1;42m\033[37m'`
+NC=`echo -e '\033[0m'`
+
+$ANT_HOME/bin/ant -logger org.apache.tools.ant.listener.AnsiColorLogger "$@" \
+ | perl -pe 's/(?<=\e\[)2;//g' \
+ | sed \
+ -e "s/\(FAILED\)/$RED\1$NC/" \
+ -e "s/\(.*Failures: [123456789].*\)/$RED\1$NC/" \
+ -e "s/\(.*Errors: [123456789].*\)/$RED\1$NC/" \
+ -e "s/\(.*Failures: 0, Errors: 0.*\)/$GREEN\1$NC/"
+}
+alias ant=antf
+
+# --------------------------------------------------------------------------------
+# bookmarks
+# --------------------------------------------------------------------------------
# save bookmarks to folders
# save x = bookmarks the current directory as x
# cd x = navigates to the bookmarked path
@@ -233,11 +257,3 @@ echo -e "${COLOR_BROWN}`bash --version`"
echo -ne "${COLOR_BG_CYAN}${COLOR_GRAY}uptime: "; uptime
echo -ne "${COLOR_BG_CYAN}${COLOR_GRAY}server time is: "; date
echo -ne "${COLOR_NC}"
-
-export PATH=/Applications/SenchaSDKTools-1.1:$PATH
-
-export PATH=/Applications/SenchaSDKTools-1.1/command:$PATH
-
-export PATH=/Applications/SenchaSDKTools-1.1/jsbuilder:$PATH
-
-export PATH=/Applications/SenchaSDKTools-1.1/appbuilder:$PATH

0 comments on commit f21620a

Please sign in to comment.