Skip to content

Commit

Permalink
made bashrc behave differently depending on OS
Browse files Browse the repository at this point in the history
  • Loading branch information
thlorenz committed Mar 11, 2012
1 parent 2c3bb18 commit 40eefe6
Showing 1 changed file with 42 additions and 12 deletions.
54 changes: 42 additions & 12 deletions bashrc
Expand Up @@ -13,12 +13,6 @@ alias ,ev='vim ~/.bashrc'
alias ,sv='source ~/.bashrc'
alias ,cv='cat ~/.bashrc'

alias eject='diskutil eject'
alias eject-kindle='diskutil eject /Volumes/Kindle'

# Launch mvim
alias :e='mvim'

# Git
alias ga='git add'
alias gp='git push'
Expand All @@ -38,15 +32,51 @@ alias gcl='git clone'
# Environment Variables
export EDITOR=vim

PATH=~/Library/Haskell/bin:~/.cabal/bin:$PATH:/usr/local/lib/node_modules/jasmine-node/bin/

# Temporary aliases
alias cd-haskell='cd ~/dev/haskell'
alias cd-realworld='cd ~/dev/haskell/real-world'

# Functions
function SetTitle
{
local title=$1
echo -n -e "\033]0;$title\007"
}

# Below are OS specific

unamestr=`uname`

# ----------- DARWIN ---------------
if [[ "$unamestr" == "Darwin" ]]; then

echo "Configuring for $unamestr"

PATH=~/Library/Haskell/bin:~/.cabal/bin:$PATH:/usr/local/lib/node_modules/jasmine-node/bin/

alias cd-haskell='cd ~/dev/haskell'
alias cd-realworld='cd ~/dev/haskell/real-world'

alias server-tlorenz='ssh tlorenz@192.168.1.117 -P 222'
alias server-root='ssh root@192.168.1.117 -P 222'

alias eject='diskutil eject'
alias eject-kindle='diskutil eject /Volumes/Kindle'

alias :e='mvim'

# ----------- LINUX ---------------
elif [[ "$unamestr" == "Linux" ]]; then

echo "Configuring for $unamestr"

PATH=~/.cabal/bin:$PATH

alias cd-haskell='cd ~/dev/haskell'
alias :e='vim'

alias update = "sudo apt-get update"
alias install = "sudo apt-get install"
alias upgrade = "sudo apt-get upgrade"
alias remove = "sudo apt-get remove"

else
echo "No special configuration known for $unamestr"
fi

0 comments on commit 40eefe6

Please sign in to comment.