Remove invalid identifiers for bash<v3
This commit is contained in:
parent
d690aa2372
commit
1518bf3612
10
bin/update
10
bin/update
|
@ -10,15 +10,15 @@ cd ~/.dotfiles
|
||||||
echo "Updating ALL the things!"
|
echo "Updating ALL the things!"
|
||||||
|
|
||||||
# Update these scripts!
|
# Update these scripts!
|
||||||
echo-g "==> Updating dotfiles"
|
echo_g "==> Updating dotfiles"
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
# Updating the system with it's package manager (brew, apt-get, etc.)
|
# Updating the system with it's package manager (brew, apt-get, etc.)
|
||||||
echo-g "==> Updating installed packages"
|
echo_g "==> Updating installed packages"
|
||||||
pkg-update
|
pkg_update
|
||||||
|
|
||||||
if command_exists zsh; then
|
if command_exists zsh; then
|
||||||
echo-g "==> Updating zsh, rvm and vim"
|
echo_g "==> Updating zsh, rvm and vim"
|
||||||
# Then the rest
|
# Then the rest
|
||||||
install/zsh
|
install/zsh
|
||||||
echo
|
echo
|
||||||
|
@ -35,4 +35,4 @@ if [ -d ~/.vim ]; then
|
||||||
install/vim
|
install/vim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo-g "==> All done!"
|
echo_g "==> All done!"
|
||||||
|
|
|
@ -11,17 +11,17 @@ app_exists() {
|
||||||
source ~/.dotfiles/zsh/functions
|
source ~/.dotfiles/zsh/functions
|
||||||
|
|
||||||
if ! is_mac; then
|
if ! is_mac; then
|
||||||
echo-r "==> Aborting. This isn't a mac!"
|
echo_r "==> Aborting. This isn't a mac!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d /usr/local/Cellar ]; then
|
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)"
|
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
|
else
|
||||||
echo-g "==> Installing all brews and apps"
|
echo_g "==> Installing all brews and apps"
|
||||||
brew tap homebrew/dupes
|
brew tap homebrew/dupes
|
||||||
|
|
||||||
brew install wget curl git
|
brew install wget curl git
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
if ! pkg-exists python; then
|
if ! pkg_exists python; then
|
||||||
pkg-install python
|
pkg_install python
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo-g "==> Installing plugins"
|
echo_g "==> Installing plugins"
|
||||||
easy_install pip
|
easy_install pip
|
||||||
easy_install cython
|
easy_install cython
|
||||||
pip install PyOpenGL PyOpenGL_accelerate
|
pip install PyOpenGL PyOpenGL_accelerate
|
||||||
|
|
10
install/rvm
10
install/rvm
|
@ -4,7 +4,7 @@ export rvm_ignore_dotfiles=yes
|
||||||
|
|
||||||
if ! command_exists rvm; then
|
if ! command_exists rvm; then
|
||||||
# If RVM's not installed, install it and the rubies
|
# If RVM's not installed, install it and the rubies
|
||||||
echo-g "==> Rvm: Installing"
|
echo_g "==> Rvm: Installing"
|
||||||
|
|
||||||
# https://rvm.io
|
# https://rvm.io
|
||||||
curl -L https://get.rvm.io | bash -s stable --ruby
|
curl -L https://get.rvm.io | bash -s stable --ruby
|
||||||
|
@ -18,11 +18,11 @@ if [ -f ~/.rvm/scripts/rvm ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update RVM
|
# Update RVM
|
||||||
# echo-g "==> Rvm: Updating"
|
# echo_g "==> Rvm: Updating"
|
||||||
# rvm get stable
|
# rvm get stable
|
||||||
|
|
||||||
# Update all rubies and rubygems
|
# 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 --system
|
||||||
rvm all do gem update
|
rvm all do gem update
|
||||||
rvm all do gem install bluecloth bundler colorize
|
rvm all do gem install bluecloth bundler colorize
|
||||||
|
@ -30,10 +30,10 @@ rvm all do gem install bluecloth bundler colorize
|
||||||
# Only mac needs this
|
# Only mac needs this
|
||||||
if is_mac; then
|
if is_mac; then
|
||||||
# Update system ruby
|
# Update system ruby
|
||||||
echo-g "==> Rvm: Updating system ruby"
|
echo_g "==> Rvm: Updating system ruby"
|
||||||
rvm use system
|
rvm use system
|
||||||
sudo gem update --system
|
sudo gem update --system
|
||||||
sudo gem update
|
sudo gem update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo-g "==> Rvm: DONE!"
|
echo_g "==> Rvm: DONE!"
|
||||||
|
|
|
@ -4,7 +4,7 @@ if is_mac; then
|
||||||
|
|
||||||
# Get SFML 2.1
|
# Get SFML 2.1
|
||||||
if [ ! -d /Library/Frameworks/SFML.framework ]; then
|
if [ ! -d /Library/Frameworks/SFML.framework ]; then
|
||||||
echo-g "==> Installing SFML 2.1"
|
echo_g "==> Installing SFML 2.1"
|
||||||
|
|
||||||
mkdir ~/.temp-sfml
|
mkdir ~/.temp-sfml
|
||||||
cd ~/.temp-sfml
|
cd ~/.temp-sfml
|
||||||
|
@ -16,11 +16,11 @@ if is_mac; then
|
||||||
|
|
||||||
pip install git+git://github.com/Sonkun/python-sfml.git
|
pip install git+git://github.com/Sonkun/python-sfml.git
|
||||||
else
|
else
|
||||||
echo-r "==> SFML 2.1 already installed"
|
echo_r "==> SFML 2.1 already installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif is_deb; then
|
elif is_deb; then
|
||||||
|
|
||||||
echo-r "==> SFML install script for linux is incomplete!"
|
echo_r "==> SFML install script for linux is incomplete!"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
10
install/tmux
10
install/tmux
|
@ -1,16 +1,16 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
if ! command_exists "tmux"; then
|
if ! command_exists "tmux"; then
|
||||||
echo-g "==> Installing tmux"
|
echo_g "==> Installing tmux"
|
||||||
pkg-install tmux
|
pkg_install tmux
|
||||||
if is_mac; then
|
if is_mac; then
|
||||||
brew install reattach-to-user-namespace libevent
|
brew install reattach-to-user-namespace libevent
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo-r "==> Tmux is already installed!"
|
echo_r "==> Tmux is already installed!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo-g "==> Tmux: Setting up symlinks"
|
echo_g "==> Tmux: Setting up symlinks"
|
||||||
do_link ~/.dotfiles/tmux.conf ~/.tmux.conf
|
do_link ~/.dotfiles/tmux.conf ~/.tmux.conf
|
||||||
|
|
||||||
echo-g "==> DONE!"
|
echo_g "==> DONE!"
|
||||||
|
|
18
install/vim
18
install/vim
|
@ -2,19 +2,19 @@
|
||||||
|
|
||||||
# Installing macvim/compiling vim
|
# Installing macvim/compiling vim
|
||||||
if is_mac && ! command_exists "mvim"; then
|
if is_mac && ! command_exists "mvim"; then
|
||||||
echo-g "==> Installing macvim"
|
echo_g "==> Installing macvim"
|
||||||
brew install macvim --devel --with-lua --override-system-vim
|
brew install macvim --devel --with-lua --override-system-vim
|
||||||
elif is_deb && ! vim --version | grep "Compiled by $(whoami)@$(hostname)" 2>&1 >/dev/null; then
|
elif is_deb && ! vim --version | grep "Compiled by $(whoami)@$(hostname)" 2>&1 >/dev/null; then
|
||||||
echo-g "==> Preparing to compile vim from source"
|
echo_g "==> Preparing to compile vim from source"
|
||||||
pkg-install libncurses5-dev libgnome2-dev libgnomeui-dev \
|
pkg_install libncurses5-dev libgnome2-dev libgnomeui-dev \
|
||||||
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
|
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
|
||||||
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial
|
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 ~
|
cd ~
|
||||||
hg clone https://code.google.com/p/vim/
|
hg clone https://code.google.com/p/vim/
|
||||||
cd vim
|
cd vim
|
||||||
echo-g "==> Compiling vim from source"
|
echo_g "==> Compiling vim from source"
|
||||||
./configure --with-features=huge \
|
./configure --with-features=huge \
|
||||||
--enable-rubyinterp \
|
--enable-rubyinterp \
|
||||||
--enable-pythoninterp \
|
--enable-pythoninterp \
|
||||||
|
@ -28,7 +28,7 @@ fi
|
||||||
|
|
||||||
# Installing vim rcfiles
|
# Installing vim rcfiles
|
||||||
if [ ! -e ~/.vimrc ]; then
|
if [ ! -e ~/.vimrc ]; then
|
||||||
echo-g "==> Installing vim rcfiles"
|
echo_g "==> Installing vim rcfiles"
|
||||||
|
|
||||||
if [ -d ~/.vim ]; then
|
if [ -d ~/.vim ]; then
|
||||||
rm -rf ~/.vim
|
rm -rf ~/.vim
|
||||||
|
@ -37,15 +37,15 @@ if [ ! -e ~/.vimrc ]; then
|
||||||
rm ~/.gvimrc
|
rm ~/.gvimrc
|
||||||
fi
|
fi
|
||||||
if is_deb; then
|
if is_deb; then
|
||||||
pkg-install cmake
|
pkg_install cmake
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install vim from my distro: https://github.com/hlissner/mlvim
|
# Install vim from my distro: https://github.com/hlissner/mlvim
|
||||||
bash <(curl https://raw.github.com/hlissner/vim/master/install.sh -L)
|
bash <(curl https://raw.github.com/hlissner/vim/master/install.sh -L)
|
||||||
else
|
else
|
||||||
# Installing/updating vim bundles
|
# Installing/updating vim bundles
|
||||||
echo-g "==> Vim: Updating..."
|
echo_g "==> Vim: Updating..."
|
||||||
vim +NeoBundleUpdate +qall
|
vim +NeoBundleUpdate +qall
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo-g "==> Vim: DONE!"
|
echo_g "==> Vim: DONE!"
|
||||||
|
|
12
install/zsh
12
install/zsh
|
@ -4,26 +4,26 @@ source ~/.dotfiles/zsh/functions
|
||||||
|
|
||||||
if [ ! -d ~/.oh-my-zsh ]; then
|
if [ ! -d ~/.oh-my-zsh ]; then
|
||||||
# Try to install zsh
|
# Try to install zsh
|
||||||
pkg-install zsh
|
pkg_install zsh
|
||||||
|
|
||||||
# https://github.com/robbyrussell/oh-my-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
|
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
|
||||||
|
|
||||||
# Set new shell
|
# Set new shell
|
||||||
echo-g "==> ZSH: Changing shell"
|
echo_g "==> ZSH: Changing shell"
|
||||||
chsh -s $(which zsh)
|
chsh -s $(which zsh)
|
||||||
else
|
else
|
||||||
echo-g "==> ZSH: Updating"
|
echo_g "==> ZSH: Updating"
|
||||||
cd ~/.oh-my-zsh
|
cd ~/.oh-my-zsh
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create links
|
# Create links
|
||||||
echo-g "==> ZSH: Setting up symlinks"
|
echo_g "==> ZSH: Setting up symlinks"
|
||||||
do_link ~/.dotfiles/zsh ~/.zsh
|
do_link ~/.dotfiles/zsh ~/.zsh
|
||||||
do_link ~/.dotfiles/zshrc ~/.zshrc
|
do_link ~/.dotfiles/zshrc ~/.zshrc
|
||||||
do_link ~/.dotfiles/zshenv ~/.zshenv
|
do_link ~/.dotfiles/zshenv ~/.zshenv
|
||||||
do_link ~/.dotfiles/bashrc ~/.bashrc
|
do_link ~/.dotfiles/bashrc ~/.bashrc
|
||||||
|
|
||||||
echo-g "==> ZSH: DONE!"
|
echo_g "==> ZSH: DONE!"
|
||||||
|
|
12
zsh/lib/os
12
zsh/lib/os
|
@ -12,29 +12,29 @@ function is_linux {
|
||||||
|
|
||||||
if is_mac; then
|
if is_mac; then
|
||||||
|
|
||||||
function pkg-install() {
|
function pkg_install() {
|
||||||
brew install $1
|
brew install $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function pkg-remove() {
|
function pkg_remove() {
|
||||||
brew remove $1
|
brew remove $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function pkg-update() {
|
function pkg_update() {
|
||||||
brew update && brew upgrade
|
brew update && brew upgrade
|
||||||
}
|
}
|
||||||
|
|
||||||
elif is_deb; then
|
elif is_deb; then
|
||||||
|
|
||||||
function pkg-install() {
|
function pkg_install() {
|
||||||
sudo apt-get -y install $1
|
sudo apt-get -y install $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function pkg-remove() {
|
function pkg_remove() {
|
||||||
sudo apt-get -y remove $1
|
sudo apt-get -y remove $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function pkg-update() {
|
function pkg_update() {
|
||||||
sudo apt-get update && sudo apt-get upgrade
|
sudo apt-get update && sudo apt-get upgrade
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@ WHITE='\e[47m' # White
|
||||||
|
|
||||||
NC="\e[m" # Color Reset
|
NC="\e[m" # Color Reset
|
||||||
|
|
||||||
function echo-g {
|
function echo_g {
|
||||||
echo -e "$green$1$NC"
|
echo -e "$green$1$NC"
|
||||||
}
|
}
|
||||||
|
|
||||||
function echo-r {
|
function echo_r {
|
||||||
echo -e "$red$1$NC"
|
echo -e "$red$1$NC"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue