Remove invalid identifiers for bash<v3

This commit is contained in:
Henrik Lissner 2013-10-18 07:03:28 -04:00
parent d690aa2372
commit 1518bf3612
10 changed files with 48 additions and 48 deletions

View file

@ -10,15 +10,15 @@ cd ~/.dotfiles
echo "Updating ALL the things!"
# Update these scripts!
echo-g "==> Updating dotfiles"
echo_g "==> Updating dotfiles"
git pull
# Updating the system with it's package manager (brew, apt-get, etc.)
echo-g "==> Updating installed packages"
pkg-update
echo_g "==> Updating installed packages"
pkg_update
if command_exists zsh; then
echo-g "==> Updating zsh, rvm and vim"
echo_g "==> Updating zsh, rvm and vim"
# Then the rest
install/zsh
echo
@ -35,4 +35,4 @@ if [ -d ~/.vim ]; then
install/vim
fi
echo-g "==> All done!"
echo_g "==> All done!"

View file

@ -11,17 +11,17 @@ app_exists() {
source ~/.dotfiles/zsh/functions
if ! is_mac; then
echo-r "==> Aborting. This isn't a mac!"
echo_r "==> Aborting. This isn't a mac!"
exit 1
fi
if [ ! -d /usr/local/Cellar ]; then
echo-g "==> Installing homebrew"
echo_g "==> Installing homebrew"
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
echo-g "Done! Don't forget to install the Command Line Tools in XCode"
echo_g "Done! Don't forget to install the Command Line Tools in XCode"
else
echo-g "==> Installing all brews and apps"
echo_g "==> Installing all brews and apps"
brew tap homebrew/dupes
brew install wget curl git

View file

@ -1,10 +1,10 @@
#!/usr/bin/env zsh
if ! pkg-exists python; then
pkg-install python
if ! pkg_exists python; then
pkg_install python
fi
echo-g "==> Installing plugins"
echo_g "==> Installing plugins"
easy_install pip
easy_install cython
pip install PyOpenGL PyOpenGL_accelerate

View file

@ -4,7 +4,7 @@ export rvm_ignore_dotfiles=yes
if ! command_exists rvm; then
# If RVM's not installed, install it and the rubies
echo-g "==> Rvm: Installing"
echo_g "==> Rvm: Installing"
# https://rvm.io
curl -L https://get.rvm.io | bash -s stable --ruby
@ -18,11 +18,11 @@ if [ -f ~/.rvm/scripts/rvm ]; then
fi
# Update RVM
# echo-g "==> Rvm: Updating"
# echo_g "==> Rvm: Updating"
# rvm get stable
# Update all rubies and rubygems
echo-g "==> Rvm: Updating rubies"
echo_g "==> Rvm: Updating rubies"
rvm all do gem update --system
rvm all do gem update
rvm all do gem install bluecloth bundler colorize
@ -30,10 +30,10 @@ rvm all do gem install bluecloth bundler colorize
# Only mac needs this
if is_mac; then
# Update system ruby
echo-g "==> Rvm: Updating system ruby"
echo_g "==> Rvm: Updating system ruby"
rvm use system
sudo gem update --system
sudo gem update
fi
echo-g "==> Rvm: DONE!"
echo_g "==> Rvm: DONE!"

View file

@ -4,7 +4,7 @@ if is_mac; then
# Get SFML 2.1
if [ ! -d /Library/Frameworks/SFML.framework ]; then
echo-g "==> Installing SFML 2.1"
echo_g "==> Installing SFML 2.1"
mkdir ~/.temp-sfml
cd ~/.temp-sfml
@ -16,11 +16,11 @@ if is_mac; then
pip install git+git://github.com/Sonkun/python-sfml.git
else
echo-r "==> SFML 2.1 already installed"
echo_r "==> SFML 2.1 already installed"
fi
elif is_deb; then
echo-r "==> SFML install script for linux is incomplete!"
echo_r "==> SFML install script for linux is incomplete!"
fi

View file

@ -1,16 +1,16 @@
#!/usr/bin/env zsh
if ! command_exists "tmux"; then
echo-g "==> Installing tmux"
pkg-install tmux
echo_g "==> Installing tmux"
pkg_install tmux
if is_mac; then
brew install reattach-to-user-namespace libevent
fi
else
echo-r "==> Tmux is already installed!"
echo_r "==> Tmux is already installed!"
fi
echo-g "==> Tmux: Setting up symlinks"
echo_g "==> Tmux: Setting up symlinks"
do_link ~/.dotfiles/tmux.conf ~/.tmux.conf
echo-g "==> DONE!"
echo_g "==> DONE!"

View file

@ -2,19 +2,19 @@
# Installing macvim/compiling vim
if is_mac && ! command_exists "mvim"; then
echo-g "==> Installing macvim"
echo_g "==> Installing macvim"
brew install macvim --devel --with-lua --override-system-vim
elif is_deb && ! vim --version | grep "Compiled by $(whoami)@$(hostname)" 2>&1 >/dev/null; then
echo-g "==> Preparing to compile vim from source"
pkg-install libncurses5-dev libgnome2-dev libgnomeui-dev \
echo_g "==> Preparing to compile vim from source"
pkg_install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial
pkg-remove vim vim-runtime gvim
pkg_remove vim vim-runtime gvim
cd ~
hg clone https://code.google.com/p/vim/
cd vim
echo-g "==> Compiling vim from source"
echo_g "==> Compiling vim from source"
./configure --with-features=huge \
--enable-rubyinterp \
--enable-pythoninterp \
@ -28,7 +28,7 @@ fi
# Installing vim rcfiles
if [ ! -e ~/.vimrc ]; then
echo-g "==> Installing vim rcfiles"
echo_g "==> Installing vim rcfiles"
if [ -d ~/.vim ]; then
rm -rf ~/.vim
@ -37,15 +37,15 @@ if [ ! -e ~/.vimrc ]; then
rm ~/.gvimrc
fi
if is_deb; then
pkg-install cmake
pkg_install cmake
fi
# Install vim from my distro: https://github.com/hlissner/mlvim
bash <(curl https://raw.github.com/hlissner/vim/master/install.sh -L)
else
# Installing/updating vim bundles
echo-g "==> Vim: Updating..."
echo_g "==> Vim: Updating..."
vim +NeoBundleUpdate +qall
fi
echo-g "==> Vim: DONE!"
echo_g "==> Vim: DONE!"

View file

@ -4,26 +4,26 @@ source ~/.dotfiles/zsh/functions
if [ ! -d ~/.oh-my-zsh ]; then
# Try to install zsh
pkg-install zsh
pkg_install zsh
# https://github.com/robbyrussell/oh-my-zsh
echo-g "==> ZSH: Installing oh-my-zsh"
echo_g "==> ZSH: Installing oh-my-zsh"
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
# Set new shell
echo-g "==> ZSH: Changing shell"
echo_g "==> ZSH: Changing shell"
chsh -s $(which zsh)
else
echo-g "==> ZSH: Updating"
echo_g "==> ZSH: Updating"
cd ~/.oh-my-zsh
git pull
fi
# Create links
echo-g "==> ZSH: Setting up symlinks"
echo_g "==> ZSH: Setting up symlinks"
do_link ~/.dotfiles/zsh ~/.zsh
do_link ~/.dotfiles/zshrc ~/.zshrc
do_link ~/.dotfiles/zshenv ~/.zshenv
do_link ~/.dotfiles/bashrc ~/.bashrc
echo-g "==> ZSH: DONE!"
echo_g "==> ZSH: DONE!"

View file

@ -12,29 +12,29 @@ function is_linux {
if is_mac; then
function pkg-install() {
function pkg_install() {
brew install $1
}
function pkg-remove() {
function pkg_remove() {
brew remove $1
}
function pkg-update() {
function pkg_update() {
brew update && brew upgrade
}
elif is_deb; then
function pkg-install() {
function pkg_install() {
sudo apt-get -y install $1
}
function pkg-remove() {
function pkg_remove() {
sudo apt-get -y remove $1
}
function pkg-update() {
function pkg_update() {
sudo apt-get update && sudo apt-get upgrade
}

View file

@ -21,11 +21,11 @@ WHITE='\e[47m' # White
NC="\e[m" # Color Reset
function echo-g {
function echo_g {
echo -e "$green$1$NC"
}
function echo-r {
function echo_r {
echo -e "$red$1$NC"
}