Skip to content

Commit

Permalink
fixed my own profile
Browse files Browse the repository at this point in the history
  • Loading branch information
betarelease committed Jun 25, 2013
2 parents 998de61 + 07cec45 commit 358e641
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 55 deletions.
9 changes: 1 addition & 8 deletions bash_boost/profile_prompt.sh
Expand Up @@ -2,14 +2,7 @@ source ~/.bash_boost/bash_colors.sh

function prompt {
PROMPT_COMMAND=detect_vcs
INTERACTIVE_PROMPT="$GREEN\${__vcs_prefix}$CYAN\${base_dir}\[\$(check_git_changes)\]\${__vcs_branch_tag}$CYAN\${__cwd}$NORMAL \$ "
NON_TTY_PROMPT='[\u@\h \W]\$ '
if [[ $- =~ i ]]
then
PS1=$INTERACTIVE_PROMPT
else
PS1=$NON_TTY_PROMPT
fi
PS1="$GREEN\${__vcs_prefix}$CYAN\${base_dir}\[\$(check_git_changes)\]\${__vcs_branch_tag}$CYAN\${__cwd}$NORMAL \$ "
# PS2='> '
# PS4='+ '
}
Expand Down
11 changes: 5 additions & 6 deletions install.rb
Expand Up @@ -46,9 +46,9 @@

puts "We will also setup a default ~/.gitconfig for you... you can change the settings from dotfiles/user_specific/#{user_profile}/gitconfig"
puts "What do you want your full name to be for git? "
git_full_name = gets.chomp
puts "What is the email you want to use for git? "
git_email = gets.chomp
git_full_name = gets.chomp
puts "What is the email you want to use for git? "
git_email = gets.chomp
gitconfig_template = File.read("templates/gitconfig")
gitconfig = gitconfig_template.gsub(/<FULL_NAME>/, git_full_name).gsub(/<EMAIL>/, git_email)
File.open("user_specific/#{user_profile}/gitconfig", "w") do |file|
Expand Down Expand Up @@ -94,8 +94,7 @@
target = File.join(home, ".user_specific")
`ln -s #{File.expand_path "user_specific/"}/#{user_profile}/ #{target}`

target = File.join(home, ".gitconfig")
`ln -s #{File.expand_path "user_specific/"}/#{user_profile}/gitconfig #{target}`
`ln -s #{File.expand_path "user_specific/"}/#{user_profile}/gitconfig #{home}/.gitconfig`

if File.exist?("emacs-starter-kit")
target = File.join(home, ".emacs.d")
Expand All @@ -108,4 +107,4 @@
`rake`
`git submodule foreach git clean -f`
Dir.chdir("../..")
end
end
27 changes: 27 additions & 0 deletions templates/gitconfig
@@ -0,0 +1,27 @@
[user]
name = <FULL_NAME>
email = <EMAIL>
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
[alias]
changes=diff --name-status -r
st=status
co=checkout
ci=commit -a
undo=checkout -f
[diff]
renames = true
[core]
excludesfile = ~/.gitignore
[mirror]
summary = true
[branch]
autosetupmerge = true
[help]
autocorrect = 1
[push]
default = matching
4 changes: 2 additions & 2 deletions the_files/bash_profile
@@ -1,8 +1,8 @@
LOGFILE=~/bash_boost.log

echo -e "bash_profile...\c" >> $LOGFILE
cat > $LOGFILE <<< "bash_profile...\c"

echo -e "bashrc...\c" >> $LOGFILE
cat >> $LOGFILE <<< "bashrc...\c"
source ~/.bashrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Expand Down
49 changes: 14 additions & 35 deletions the_files/bashrc
Expand Up @@ -2,65 +2,44 @@ if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

SCRIPT_PATH="${BASH_SOURCE[0]}"
if [[ -h $SCRIPT_PATH ]] ; then
while [[ -h $SCRIPT_PATH ]] ; do SCRIPT_PATH=`readlink $SCRIPT_PATH`; done
fi

SCRIPT_DIR=`dirname $SCRIPT_PATH`

# Load host-specific settings, if any
if [[ -d $SCRIPT_DIR/`hostname` ]]; then
HOST_SETTINGS_DIR=$SCRIPT_DIR/`hostname`
elif [[ -d $HOME/.`hostname` ]]; then
HOST_SETTINGS_DIR=$HOME/.`hostname`
fi

if [[ -d $HOST_SETTINGS_DIR ]] ; then
echo "Sourcing files found in $HOST_SETTINGS_DIR..."
for file in $HOST_SETTINGS_DIR/*; do source $file; done
fi


LOGFILE=~/bash_boost.log
cat > $LOGFILE <<< "--- Attempting to boost your bash..."

echo -e "--- Attempting to boost your bash..." > $LOGFILE

echo -e "version control boost...\c" >> $LOGFILE
cat >> $LOGFILE <<< "version control boost..."
source ~/.bash_boost/bash_vcs.sh

echo -e "custom prompt...\c" >> $LOGFILE
cat >> $LOGFILE <<< "custom prompt..."
source ~/.bash_boost/profile_prompt.sh

echo -e "rvm boost...\c" >> $LOGFILE
cat >> $LOGFILE <<< "rvm boost..."
source ~/.bash_boost/bash_rvm.sh

echo -e "aliases...\c" >> $LOGFILE
cat >> $LOGFILE <<< "aliases..."
source ~/.aliases

echo -e "cd command boost...\c" >> $LOGFILE
cat >> $LOGFILE <<< "cd command boost..."
source ~/.bash_boost/cdargs-bash.sh
source ~/.bash_boost/cdargs.sh

echo -e "history boost...\c" >> $LOGFILE
cat >> $LOGFILE <<< "history boost..."
source ~/.history

echo -e "terminal_colors...\c" >> $LOGFILE
cat >> $LOGFILE <<< "terminal_colors..."
source ~/.bash_boost/terminal_colors

echo -e "environment...\c" >> $LOGFILE
cat >> $LOGFILE <<< "environment..."
source ~/.os_specific/loader

echo -e "emacs_server...\c" >> $LOGFILE
cat >> $LOGFILE <<< "emacs_server..."
source ~/.bash_boost/emacs_server

echo -e "paths..." >> $LOGFILE
cat >> $LOGFILE <<< "paths..."
source ~/.os_specific/paths

echo -e "java functions..." >> $LOGFILE
cat >> $LOGFILE <<< "java functions..."
source ~/.bash_boost/java_functions.sh

echo -e "user specific boost..." >> $LOGFILE
cat >> $LOGFILE <<< "user specific boost..."
source ~/.user_specific/loader

echo "--- Boost process Successful and Complete! (details logged to $LOGFILE)"
cat >> $LOGFILE <<< "--- Boost process Successful and Complete!"
4 changes: 0 additions & 4 deletions user_specific/sudhindra/gitconfig
Expand Up @@ -13,10 +13,6 @@
co=checkout
[diff]
renames = true
[alias]
st = status
ci = commit
co = checkout
[core]
excludesfile = ~/.gitignore
[mirror]
Expand Down

0 comments on commit 358e641

Please sign in to comment.