Added some echo statements to make clear what is going on

This commit is contained in:
Ian 2012-07-03 10:13:15 -04:00
parent 185ebd2ced
commit 3acebf860a

View File

@ -13,44 +13,54 @@ command -v git >/dev/null 2>&1 || {
exit 1; exit 1;
} }
# Clone vundle # Clone vundle if not done already
if [ ! -d ~/.vim/bundle/vundle ]; then
echo "Installing vundle"
mkdir -p ~/.vim/bundle mkdir -p ~/.vim/bundle
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
fi
# Make backup and tmp dirs # Make backup and tmp dirs
echo "Building temp and backup dirs"
mkdir -p ~/.vim/backup mkdir -p ~/.vim/backup
mkdir -p ~/.vim/tmp mkdir -p ~/.vim/tmp
mkdir -p ~/.vim/doc mkdir -p ~/.vim/doc
# If a .vimrc_sync doesn't exist, link it # If a .vimrc_sync doesn't exist, link it
if [[ ! ( -f ~/.vimrc_sync ) ]]; then if [[ ! ( -f ~/.vimrc_sync ) ]]; then
echo "Linking sync'd vimrc"
ln -s $VIM_SYNC_DIR/vim/dot_vimrc ~/.vimrc_sync ln -s $VIM_SYNC_DIR/vim/dot_vimrc ~/.vimrc_sync
fi fi
# If a .vim_drpobox dir doesn't exist, link it # If a .vim_drpobox dir doesn't exist, link it
if [[ ! ( -d ~/.vim_sync ) ]]; then if [[ ! ( -d ~/.vim_sync ) ]]; then
echo "Linking sync'd vim runtime"
ln -s $VIM_SYNC_DIR/vim/dot_vim ~/.vim_sync ln -s $VIM_SYNC_DIR/vim/dot_vim ~/.vim_sync
fi fi
# if there is no .vimrc file already, make a blank one # if there is no .vimrc file already, make a blank one
if [[ ( ! -f ~/.vimrc ) ]]; then if [[ ( ! -f ~/.vimrc ) ]]; then
echo "No ~/.vimrc found, creating one"
touch ~/.vimrc touch ~/.vimrc
fi fi
# if not already sourcing the synced version, source it # if not already sourcing the synced version, source it
if ! ( grep -q 'source ~/.vimrc_sync' ~/.vimrc ); then if ! ( grep -q 'source ~/.vimrc_sync' ~/.vimrc ); then
echo "Source sync'd vimrc in vimrc"
echo '' >> ~/.vimrc echo '' >> ~/.vimrc
echo '"import vimrc from synced' >> ~/.vimrc echo '"import vimrc from synced' >> ~/.vimrc
echo 'source ~/.vimrc_sync' >> ~/.vimrc echo 'source ~/.vimrc_sync' >> ~/.vimrc
fi fi
if ! ( grep -q 'set runtimepath+=$HOME/.vim_sync' ~/.vimrc ); then if ! ( grep -q 'set runtimepath+=$HOME/.vim_sync' ~/.vimrc ); then
echo "Add sync'd vim dir to runtime"
echo '' >> ~/.vimrc echo '' >> ~/.vimrc
echo '"add vim directory from synced' >> ~/.vimrc echo '"add vim directory from synced' >> ~/.vimrc
echo 'set runtimepath+=$HOME/.vim_sync' >> ~/.vimrc echo 'set runtimepath+=$HOME/.vim_sync' >> ~/.vimrc
fi fi
# Install all bundles # Install all bundles
echo "Install all bundles"
vim +BundleInstall! +qall vim +BundleInstall! +qall
# Compile CommandT if possible # Compile CommandT if possible
@ -60,12 +70,14 @@ if command -v ruby >/dev/null 2>&1; then
if command -v gcc >/dev/null 2>&1; then if command -v gcc >/dev/null 2>&1; then
# Use system ruby # Use system ruby
command -v rvm >/dev/null 2>&1 && { rvm use system; } command -v rvm >/dev/null 2>&1 && { rvm use system; }
echo "Compile Command T's C extension"
cd ~/.vim/bundle/Command-T/ruby/command-t cd ~/.vim/bundle/Command-T/ruby/command-t
ruby extconf.rb ruby extconf.rb
make make
fi fi
fi fi
# Display warning methods related to Command T
vim --version | grep -q '\+ruby' || { echo "Warning: Default vim does not include ruby as needed for Command T"; } vim --version | grep -q '\+ruby' || { echo "Warning: Default vim does not include ruby as needed for Command T"; }
command -v ruby >/dev/null 2>&1 || { echo "Warning: ruby required for Command T"; } command -v ruby >/dev/null 2>&1 || { echo "Warning: ruby required for Command T"; }
command -v gcc >/dev/null 2>&1 || { echo "Warning: gcc required for Command T"; } command -v gcc >/dev/null 2>&1 || { echo "Warning: gcc required for Command T"; }