Permalink
Browse files

adding bash profile to base lion

  • Loading branch information...
1 parent 2bc72ec commit e02f5160e2f47f787371851ccdb2f4dcbf0bd73d Brian Cunnie & Matthew Kocher committed Jul 28, 2011
View
1 .gitignore
@@ -1,2 +1,3 @@
+.DS_Store
*.swp
*.idea
View
2 recipes/bash_profile-better_history.rb
@@ -1,3 +1 @@
-include_recipe "pivotal_workstation::bash_profile"
-
bash_profile_include("better_history")
View
2 recipes/bash_profile-no_sudo_gem_install.rb
@@ -1,3 +1 @@
-include_recipe "pivotal_workstation::bash_profile"
-
bash_profile_include("no_sudo_gem_install")
View
2 recipes/bash_profile-ps1.rb
@@ -1,3 +1 @@
-include_recipe "pivotal_workstation::bash_profile"
-
bash_profile_include("ps1")
View
3 recipes/lion_basedev.rb
@@ -19,4 +19,7 @@
include_recipe "pivotal_workstation::textmate"
include_recipe "pivotal_workstation::textmate_set_defaults"
include_recipe "pivotal_workstation::libreoffice"
+include_recipe "pivotal_workstation::bash_profile-better_history"
+include_recipe "pivotal_workstation::bash_profile-no_sudo_gem_install"
+include_recipe "pivotal_workstation::bash_profile-ps1"
#include_recipe "pivotal_workstation::mysql" # broken
View
1 templates/default/bash_profile-better_history.sh.erb
@@ -1,4 +1,3 @@
export HISTCONTROL=ignoredups;
shopt -s histappend;
PROMPT_COMMAND='history -a';
-shopt -s cdspell;
View
22 templates/default/bash_profile-ps1.sh.erb
@@ -3,24 +3,6 @@ parse_git_branch() {
}
export -f parse_git_branch
-parse_svn_branch() {
- parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print "(svn::"$1 "/" $2 ")"}'
-}
-export -f parse_svn_branch
-
-parse_svn_url() {
- svn info 2>/dev/null | grep -e '^URL*' | sed -e 's#^URL: *\(.*\)#\1#g '
-}
-export -f parse_svn_url
-
-parse_svn_repository_root() {
- svn info 2>/dev/null | grep -e '^Repository Root:*' | sed -e 's#^Repository Root: *\(.*\)#\1\/#g '
-}
-export -f parse_svn_repository_root
-
-export SUDO_PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[0m\]'
-export PS1="\h:\w \$(parse_git_branch)$ "
-
export CLICOLOR=1
-export PS1="\[\033[36m\]\h:\w \[\033[33m\]\$(parse_svn_branch)\$(parse_git_branch)\[\033[00m\]$\[\033[00m\] "
-
+export PS1="\[\033[36m\]\h:\w \[\033[33m\]\$(parse_git_branch)\[\033[00m\]$\[\033[00m\] "
+export SUDO_PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[0m\]'
View
2 templates/default/bash_profile.erb
@@ -1,6 +1,6 @@
# Chef assumes that it owns this file.
# Additions to bash should be placed into $HOME/<%= BASH_INCLUDES_DIRNAME %>/ with a .sh extension
-for file in $(\ls -1 ${HOME}/<%= BASH_INCLUDES_DIRNAME %>/*.sh); do
+for file in ~/.bash_profile_includes/*.sh; do
source $file;
done

0 comments on commit e02f516

Please sign in to comment.