Migrating stuff over to OSX
This commit is contained in:
parent
311629e01f
commit
f147852215
8 changed files with 148 additions and 83 deletions
44
bashrc
44
bashrc
|
@ -1,11 +1,27 @@
|
|||
# To use, simply add the following to /etc/bash.bashrc or ~/.bashrc
|
||||
# To use, simply add the following to:
|
||||
# /etc/bash.bashrc or ~/.bashrc (Linux)
|
||||
# ~/.bash_profile (Mac OS X)
|
||||
#
|
||||
# if [ -f /path/to/this/bash.bashrc ] && ! shopt -oq posix; then
|
||||
# if [ -f /path/to/this/bash.bashrc ] && ! shopt -oq posix;
|
||||
# then
|
||||
# . /path/to/this/bash.bashrc
|
||||
# fi
|
||||
|
||||
export PATH="$HOME/Source/bash:$PATH"
|
||||
export EDITOR=vim
|
||||
if [ `uname` == "Darwin" ];
|
||||
then
|
||||
# Tell ls to be colourful
|
||||
export CLICOLOR=1
|
||||
export LSCOLORS=Exfxcxdxbxegedabagacad
|
||||
|
||||
# Tell grep to highlight matches
|
||||
export GREP_OPTIONS='--color=auto'
|
||||
|
||||
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
|
||||
export EDITOR="mvim -v"
|
||||
else
|
||||
export PATH="$HOME/Source/bash:$PATH"
|
||||
export EDITOR=vim
|
||||
fi
|
||||
|
||||
export GIT_PS1_SHOWDIRTYSTATE=true
|
||||
export GIT_PS1_SHOWSTASHSTATE=true
|
||||
|
@ -76,10 +92,13 @@ alias agr="sudo apt-get remove"
|
|||
alias agud="sudo apt-get update"
|
||||
alias agug="sudo apt-get upgrade"
|
||||
alias aguu="sudo apt-get update && sudo apt-get upgrade"
|
||||
|
||||
# cd *
|
||||
alias desktop="cd ~/Desktop"
|
||||
|
||||
# free
|
||||
alias fm="free -m"
|
||||
|
||||
# git
|
||||
alias ga="git add"
|
||||
alias gaa="git add ."
|
||||
|
@ -110,14 +129,25 @@ alias grr="git remote rm"
|
|||
alias grro="git remote rm origin"
|
||||
alias grm="git rm"
|
||||
alias gs="git status"
|
||||
|
||||
# memcached
|
||||
alias mc="telnet localhost 11211"
|
||||
|
||||
# mysql
|
||||
alias mycs="mysql crowdsavings"
|
||||
alias mysk="mysql scenekids"
|
||||
|
||||
# service
|
||||
alias service="sudo service"
|
||||
|
||||
# vim
|
||||
alias v="vim"
|
||||
alias vd="vimdiff"
|
||||
alias vo="vim -O"
|
||||
if [ `uname` == "Darwin" ];
|
||||
then
|
||||
alias v='mvim -v'
|
||||
alias vd="mvimdiff -v"
|
||||
alias vo="mvim -v -O"
|
||||
else
|
||||
alias v="vim"
|
||||
alias vd="vimdiff"
|
||||
alias vo="vim -O"
|
||||
fi
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
color = true
|
||||
|
||||
[core]
|
||||
editor = vi
|
||||
editor = /usr/bin/vim
|
||||
|
||||
[color]
|
||||
branch = auto
|
30
osx-setup.sh
Executable file
30
osx-setup.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
# TODO Installs Homebew
|
||||
brew install git ssh-copy-id bash-completion macvim multitail nmap tmux wget
|
||||
# TODO Installs Server stuff (nginx, php53, pear, redis, memcached, what have you)
|
||||
|
||||
# Clears out the old .bash_profile
|
||||
if [ -f ~/.bash_profile ];
|
||||
then
|
||||
rm ~/.bash_profile
|
||||
fi
|
||||
|
||||
PWD=`pwd`
|
||||
|
||||
# Adds paths and custom .bashrc
|
||||
echo "
|
||||
export PATH=\"$PWD/git:$PATH\"
|
||||
|
||||
if [ -f $PWD/bashrc ] && ! shopt -oq posix;
|
||||
then
|
||||
. $PWD/bashrc
|
||||
fi
|
||||
|
||||
if [ -f `brew --prefix`/etc/bash_completion ];
|
||||
then
|
||||
. `brew --prefix`/etc/bash_completion
|
||||
fi
|
||||
" >> ~/.bash_profile
|
||||
|
||||
#./vim-setup.sh
|
|
@ -62,38 +62,7 @@ fi
|
|||
# Symlinks back to our scripts
|
||||
ln -s $PWD/nautilus-scripts ~/.gnome2/nautilus-scripts
|
||||
|
||||
# Copies .vimrc
|
||||
if [ -f ~/.vimrc ];
|
||||
then
|
||||
rm ~/.vimrc
|
||||
fi
|
||||
|
||||
cp $PWD/vimrc ~/.vimrc
|
||||
|
||||
# Pulls down and installs vim plugins
|
||||
DOTVIM=~/.vim
|
||||
|
||||
if [ -d $DOTVIM ];
|
||||
then
|
||||
rm -r $DOTVIM
|
||||
fi
|
||||
|
||||
mkdir $DOTVIM
|
||||
|
||||
OWNERS=( "ervandew" "msanders" "nvie" "scrooloose" "scrooloose" "tpope" "vim-scripts" )
|
||||
REPOS=( "supertab" "snipmate.vim" "vim-togglemouse" "nerdtree" "syntastic" "vim-fugitive" "Command-T" )
|
||||
|
||||
for (( i = 0 ; i < ${#OWNERS[@]} ; i++ ))
|
||||
do
|
||||
git clone git://github.com/${OWNERS[$i]}/${REPOS[$i]}.git /tmp/${REPOS[$i]}
|
||||
cp -R /tmp/${REPOS[$i]}/* $DOTVIM
|
||||
rm -rf /tmp/${REPOS[$i]}
|
||||
done
|
||||
|
||||
# Finish up Command-T installation
|
||||
cd $DOTVIM/ruby/command-t
|
||||
ruby extconf.rb
|
||||
make
|
||||
./vim-setup.sh
|
||||
|
||||
echo; echo "SETUP COMPLETE!!~!"
|
||||
echo; echo "For further enhancement, do this: http://www.omgubuntu.co.uk/2011/10/use-adwaita-dark-as-your-system-theme/"
|
36
vim/vim-setup.sh
Executable file
36
vim/vim-setup.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
PWD=`pwd`
|
||||
|
||||
# Copies .vimrc
|
||||
if [ -f ~/.vimrc ];
|
||||
then
|
||||
rm ~/.vimrc
|
||||
fi
|
||||
|
||||
cp $PWD/vimrc ~/.vimrc
|
||||
|
||||
# Pulls down and installs vim plugins
|
||||
DOTVIM=~/.vim
|
||||
|
||||
if [ -d $DOTVIM ];
|
||||
then
|
||||
rm -r $DOTVIM
|
||||
fi
|
||||
|
||||
mkdir $DOTVIM
|
||||
|
||||
OWNERS=( "ervandew" "msanders" "nvie" "scrooloose" "scrooloose" "tpope" "vim-scripts" )
|
||||
REPOS=( "supertab" "snipmate.vim" "vim-togglemouse" "nerdtree" "syntastic" "vim-fugitive" "Command-T" )
|
||||
|
||||
for (( i = 0 ; i < ${#OWNERS[@]} ; i++ ))
|
||||
do
|
||||
git clone git://github.com/${OWNERS[$i]}/${REPOS[$i]}.git /tmp/${REPOS[$i]}
|
||||
cp -R /tmp/${REPOS[$i]}/* $DOTVIM
|
||||
rm -rf /tmp/${REPOS[$i]}
|
||||
done
|
||||
|
||||
# Finish up Command-T installation
|
||||
cd $DOTVIM/ruby/command-t
|
||||
ruby extconf.rb
|
||||
make
|
Loading…
Add table
Add a link
Reference in a new issue