Skip to content

Commit

Permalink
Setups for desktop/client Ubuntu and Java. Added Pathogen to vim
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeplate committed Oct 11, 2012
1 parent 50c0674 commit 701b52c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
21 changes: 21 additions & 0 deletions desktop-setup.sh
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Setup Ubuntu system.

# Ensure running as root
if [ "$(id -u)" -ne 0 ]; then
echo 'This script is designed to run as root'
exit
fi

echo 'Setup file browser Nautilus'
apt-get -yq install nautilus-open-terminal nautilus-actions

# Reload any changes to Nautilus
nautilus -q

echo 'Install applications'
apt-get -yq install compizconfig-settings-manager

echo 'Finished'

5 changes: 5 additions & 0 deletions java-setup.sh
@@ -0,0 +1,5 @@
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get -yq install oracle-java7-installer

24 changes: 17 additions & 7 deletions vim-setup.sh
@@ -1,12 +1,12 @@
#!/bin/bash

# Ensure directories exist
if [ ! -d ~/.vim/syntax ]; then
mkdir -p ~/.vim/syntax
fi
if [ ! -d ~/.vim/ftdetect ]; then
mkdir -p ~/.vim/ftdetect
fi
vim_dirs=(autoload syntax ftdetect bundle)
for vimdir in "${vim_dirs[@]}"; do
if [ ! -d ~/.vim/$vimdir ]; then
mkdir -p ~/.vim/$vimdir
fi
done

# ASP.NET Syntax
wget http://www.vim.org/scripts/download_script.php?src_id=2906 -O ~/.vim/syntax/aspnet.vim
Expand All @@ -20,13 +20,23 @@ echo "au BufRead,BufNewFile *.rb,*.ru,Rakefile,rakefile set filetype=ruby" > ~/.
wget https://github.com/evanmiller/nginx-vim-syntax/raw/master/syntax/nginx.vim -O ~/.vim/syntax/nginx.vim
echo "au BufRead,BufNewFile *.conf set filetype=nginx" > ~/.vim/ftdetect/nginx.vim

# Pathogen
wget https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim -O ~/.vim/autoload/pathogen.vim

# Github projects
git clone --depth=1 https://github.com/sukima/xmledit.git ~/.vim/bundle/xmledit
rm -rf ~/.vim/bindle/xmledit/.git

# Ensure autostart script statements
vimrc_commands=(
"colorscheme desert"
"set tabstop=4 softtabstop=4 shiftwidth=4 expandtab autoindent smartindent"
"call pathogen#infect()"
"filetype plugin indent on"
)
touch ~/.vimrc
for cmd in "${vimrc_commands[@]}"; do
grep -qE "^$cmd\$" ~/.vimrc
grep -q "$cmd" ~/.vimrc
if [ $? -ne 0 ]; then
echo "$cmd" >> ~/.vimrc
fi
Expand Down

0 comments on commit 701b52c

Please sign in to comment.