Skip to content

Commit

Permalink
Support custom SRC directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Sep 10, 2015
1 parent 9468636 commit d148dd4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
7 changes: 4 additions & 3 deletions .cshrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ if ( -f "$HOME/.locale" && ! $?LANG && ! $?LC_ALL ) then
setenv LANG "`cat ~/.locale`"
endif

if ( ! $?SRC ) setenv SRC "$HOME/src"

setenv ENV "$HOME/.shrc"
setenv BASH_ENV "$HOME/.zshenv"
setenv CLASSPATH '.'
if ( ! $?CLASSPATH ) setenv CLASSPATH '.'
if ( -d "$HOME/.java" ) setenv CLASSPATH "${CLASSPATH}:$HOME/.java/*"
setenv RUBYLIB "$HOME/src/ruby/lib:$HOME/.ruby/lib"
setenv RUBYLIB "$SRC/ruby/lib:$HOME/.ruby/lib"
setenv RUBYOPT "-rtpope"
setenv PERL5LIB "$HOME/.perl5:$HOME/perl5:$HOME/.perl:$HOME/perl"
setenv RSYNC_RSH 'ssh -axqoBatchMode=yes'
if ( { test -t 1 } ) setenv RSYNC_RSH 'ssh -ax'

Expand Down
11 changes: 7 additions & 4 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
" ~/.vimrc

if filereadable(expand('~/src/vim/bundle/vim-pathogen/autoload/pathogen.vim'))
source ~/src/vim/bundle/vim-pathogen/autoload/pathogen.vim
if !exists('$SRC')
let $SRC = resolve(expand('~/src'))
endif
if filereadable(expand('$SRC/vim/bundle/vim-pathogen/autoload/pathogen.vim'))
source $SRC/vim/bundle/vim-pathogen/autoload/pathogen.vim
endif
if has("win32")
let &runtimepath = substitute(&runtimepath,'\(Documents and Settings\|Users\)[\\/][^\\/,]*[\\/]\zsvimfiles\>','.vim','g')
endif
silent! execute pathogen#infect("~/src/vim/vendor/{}")
silent! execute pathogen#infect("~/src/vim/bundle/{}")
silent! execute pathogen#infect("$SRC/vim/vendor/{}")
silent! execute pathogen#infect("$SRC/vim/bundle/{}")

" Section: Options {{{1
" ---------------------
Expand Down
18 changes: 5 additions & 13 deletions .zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
unset vars

ENV="$HOME/.shrc"
BASH_ENV="$HOME/.shenv"
BASH_ENV="$HOME/.zshenv"
export ENV BASH_ENV

for dir in /usr/local/bin "$HOME/.rbenv/bin" "$HOME/.rbenv/shims" "$HOME/bin"; do
Expand All @@ -33,6 +33,9 @@ done
unset dir
export PATH

[ -n "$SRC" ] || SRC="$HOME/src"
export SRC

if [ -z "$LANG" -a -z "$LC_ALL" -a -f "$HOME/.locale" ]; then
LANG=`cat "$HOME/.locale"`
export LANG
Expand All @@ -44,21 +47,10 @@ if [ -z "$CLASSPATH" ]; then
export CLASSPATH
fi

RUBYLIB="$HOME/src/ruby/lib:$HOME/.ruby/lib"
RUBYLIB="$SRC/ruby/lib:$HOME/.ruby/lib"
RUBYOPT=-rtpope
export RUBYLIB RUBYOPT

if [ -z "$PERL5LIB" ]; then
for dir in "$HOME/.perl5" "$HOME/perl5" "$HOME/.perl" "$HOME/perl"; do
case ":$PERL5LIB:" in
*:"$dir":*) ;;
*) [ ! -d "$dir" ] || PERL5LIB="$PERL5LIB:$dir"
esac
done
PERL5LIB="`echo "$PERL5LIB"|sed -e 's/^://'`"
export PERL5LIB
fi

if [ -t 1 ]; then
RSYNC_RSH='ssh -ax'
else
Expand Down

0 comments on commit d148dd4

Please sign in to comment.