Permalink
Browse files

updated bootstrapper

  • Loading branch information...
nvandijk committed Dec 19, 2012
1 parent da5cac8 commit b05b75dc866424a1c2936badfc342016791dec07
Showing with 16 additions and 20 deletions.
  1. +9 −8 .aliases
  2. +7 −12 bootstrap.sh
View
@@ -1,36 +1,37 @@
-# Shortcuts
+# shortcuts
alias g="git"
-alias w="workon"
alias s="subl"
+alias w="workon"
alias o="open"
+# navigation
alias ..="cd .."
alias ...="cd ../.."
alias p="cd ~/Development/projects"
-# Show/hide hidden files in Finder
+# show/hide hidden files in Finder
alias showdesktop="defaults write com.apple.Finder AppleShowAllFiles -bool true && killall Finder"
alias hidedesktop="defaults write com.apple.Finder AppleShowAllFiles -bool false && killall Finder"
-# Enhanced WHOIS lookups
+# enhanced WHOIS lookups
alias whois="whois -h whois-servers.net"
-# IP addresses
+# ip addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
-# Detect which `ls` flavor is in use
+# detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color"
else # OS X `ls`
colorflag="-G"
fi
-# List all files colorized in long format
+# list all files colorized in long format
alias l="ls -l ${colorflag}"
-# List all files colorized in long format, including dot files
+# list all files colorized in long format, including dot files
alias ll="ls -la ${colorflag}"
# django runserver
View
@@ -1,30 +1,25 @@
#!/bin/bash
echo "symlink .bash_profile"
-rm -f ~/.bash_profile
-ln -s ~/.dotfiles/.bash_profile ~/.bash_profile
+[ ! -f ~/.bash_profile ] && ln -s ~/.dotfiles/.bash_profile ~/.bash_profile
echo "symlink .screenrc"
-rm -f ~/.screenrc
-ln -s ~/.dotfiles/.screenrc ~/.screenrc
+[ ! -f ~/.screenrc ] && ln -s ~/.dotfiles/.screenrc ~/.screenrc
echo "symlink .gitconfig"
-rm -f ~/.gitconfig
-ln -s ~/.dotfiles/.gitconfig ~/.gitconfig
+[ ! -f ~/.gitconfig ] && ln -s ~/.dotfiles/.gitconfig ~/.gitconfig
echo "symlink .gitignore"
-rm -f ~/.gitignore
-ln -s ~/.dotfiles/.gitignore ~/.gitignore
+[ ! -f ~/.gitignore ] && ln -s ~/.dotfiles/.gitignore ~/.gitignore
echo "symlink Sublime Text preferences and keymap"
rm -f ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Preferences.sublime-settings
ln -s ~/.dotfiles/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Preferences.sublime-settings
rm -f ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Default\ \(OSX\).sublime-keymap
ln -s ~/.dotfiles/Default\ \(OSX\).sublime-keymap ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Default\ \(OSX\).sublime-keymap
-echo "symlink Sublime Text command line"
-rm -f /usr/local/bin/subl
-ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
+echo "symlink Sublime Text 2 command line"
+[ ! -f /usr/local/bin/subl ] && ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
-echo "setup osx settings"
+echo "setup os x settings"
./.osx

0 comments on commit b05b75d

Please sign in to comment.