diff --git a/.gitmodules b/.gitmodules index 3463ed0..42c26e1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "tomorrow-theme"] path = tomorrow-theme url = git@github.com:jpf/tomorrow-theme.git -[submodule ".oh-my-zsh"] - path = .oh-my-zsh - url = git@github.com:robbyrussell/oh-my-zsh.git diff --git a/bin/emacs-starter-kit.sh b/bin/emacs-starter-kit.sh new file mode 100755 index 0000000..93b3eb7 --- /dev/null +++ b/bin/emacs-starter-kit.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cd ~ +git clone http://github.com/eschulte/emacs-starter-kit.git +mv emacs-starter-kit/ .emacs.d +cd ~/.emacs.d/ +git submodule init +git submodule update +cd src/org/ +make +cd ../.. +cd src/auctex +./configure && make \ No newline at end of file diff --git a/extensions/aliases b/extensions/aliases index e5761d7..a3ae176 100644 --- a/extensions/aliases +++ b/extensions/aliases @@ -1,17 +1,6 @@ -if [ -n "$ZSH_VERSION" ]; then - # assume Zsh - alias up="source ~/.zshrc" -elif [ -n "$BASH_VERSION" ]; then - # assume Bash - alias up="source ~/.bash_profile" -else - # asume something else - : # do nothing -fi - +alias up="source ~/.bash_profile" alias flip="tr '\r' '\n'" alias ll="ls -alG" -alias l="ls -G" alias pp="ping 4.2.2.2" alias router="netstat -rn|egrep '^(0.0.0.0|default)'|awk '{print $2}'" diff --git a/extensions/bash b/extensions/bash index b9a4b03..32b8396 100644 --- a/extensions/bash +++ b/extensions/bash @@ -1,53 +1,49 @@ -if [ -n "$BASH_VERSION" ]; then - - # notify of bg job completion immediately - set -o notify - - # shell options - # From: https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc - shopt -s cdspell >/dev/null 2>&1 - shopt -s extglob >/dev/null 2>&1 - shopt -s hostcomplete >/dev/null 2>&1 - shopt -s interactive_comments >/dev/null 2>&1 - shopt -u mailwarn >/dev/null 2>&1 - shopt -s no_empty_cmd_completion >/dev/null 2>&1 - - # disable core dumps - ulimit -S -c 0 - - # enable en_US locale w/ utf-8 encodings if not already configured - : ${LANG:="en_US.UTF-8"} - : ${LANGUAGE:="en"} - : ${LC_CTYPE:="en_US.UTF-8"} - : ${LC_ALL:="en_US.UTF-8"} - - # save all the histories - HISTSIZE=1000000000 - - # when completing file names, ignore: python bytecode, "*~" backup files - FIGNORE=".pyc:~" - - # ---------------------------------------------------------------------- - # BASH COMPLETION - # ---------------------------------------------------------------------- - # Also from: https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc - - test -z "$BASH_COMPLETION" && { - bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} - test -n "$PS1" && test $bmajor -gt 1 && { - # search for a bash_completion file to source - for f in /usr/local/etc/bash_completion \ - /usr/pkg/etc/bash_completion \ - /opt/local/etc/bash_completion \ - /etc/bash_completion - do - test -f $f && { - . $f - break - } - done - } - unset bash bmajor bminor +# notify of bg job completion immediately +set -o notify + +# shell options +# From: https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc +shopt -s cdspell >/dev/null 2>&1 +shopt -s extglob >/dev/null 2>&1 +shopt -s hostcomplete >/dev/null 2>&1 +shopt -s interactive_comments >/dev/null 2>&1 +shopt -u mailwarn >/dev/null 2>&1 +shopt -s no_empty_cmd_completion >/dev/null 2>&1 + +# disable core dumps +ulimit -S -c 0 + +# enable en_US locale w/ utf-8 encodings if not already configured +: ${LANG:="en_US.UTF-8"} +: ${LANGUAGE:="en"} +: ${LC_CTYPE:="en_US.UTF-8"} +: ${LC_ALL:="en_US.UTF-8"} + +# save all the histories +HISTSIZE=1000000000 + +# when completing file names, ignore: python bytecode, "*~" backup files +FIGNORE=".pyc:~" + +# ---------------------------------------------------------------------- +# BASH COMPLETION +# ---------------------------------------------------------------------- +# Also from: https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc + +test -z "$BASH_COMPLETION" && { + bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} + test -n "$PS1" && test $bmajor -gt 1 && { + # search for a bash_completion file to source + for f in /usr/local/etc/bash_completion \ + /usr/pkg/etc/bash_completion \ + /opt/local/etc/bash_completion \ + /etc/bash_completion + do +test -f $f && { + . $f + break + } + done } - -fi + unset bash bmajor bminor +} diff --git a/extensions/prompt b/extensions/prompt index 015666d..72726e5 100644 --- a/extensions/prompt +++ b/extensions/prompt @@ -22,4 +22,3 @@ PS1='`rv`${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\0 # full line? # hostname, colored using hash of hostname # compressed ts - diff --git a/setup.sh b/setup.sh index 3b31179..0f4f980 100755 --- a/setup.sh +++ b/setup.sh @@ -6,21 +6,11 @@ if [ "${CWD##*/}" != ".profile.d" ]; then echo "The name of this directory should be '.profile.d'" exit 1 fi - -cd ~ -set -x - if [ -f ~/.bash_profile ]; then echo "You already have a .bash_profile. Backup that file and then run this script again" -else - ln -s $CWD/.bash_profile . - echo "Installed .bash_profile" + exit 1 fi -if [ -f ~/.zshrc ]; then - echo "You already have a .zshrc. Backup that file and then run this script again" -else - ln -s $CWD/.zshrc . - ln -s $CWD/.oh-my-zsh . - echo "Installed .zshrc" -fi +cd ~ +set -x +ln -s $CWD/.bash_profile .