Skip to content

Instantly share code, notes, and snippets.

@masawada
Created April 23, 2014 06:43
Show Gist options
  • Save masawada/11204843 to your computer and use it in GitHub Desktop.
Save masawada/11204843 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Script for installing zsh on systems where you don't have root access.
# zsh will be installed in $HOME/local/bin
# It's asuumed that wget and a C/C++ compiler are installed
# exit on error
set -e
ZSH_VERSION=5.0.2
mkdir -p $HOME/local $HOME/zsh_tmp
cd $HOME/zsh_tmp
wget -O zsh-${ZSH_VERSION}.tar.bz2 http://sourceforge.net/projects/zsh/files/zsh/${ZSH_VERSION}/zsh-${ZSH_VERSION}.tar.bz2/download
tar jxvf zsh-${ZSH_VERSION}.tar.bz2
cd zsh-${ZSH_VERSION}
./configure --prefix=$HOME/local --enable-multibyte --enable-pcre CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-L$HOME/local/lib -L$HOME/local/include/ncurses -L$HOME/local/include"
CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment