Last active
January 29, 2018 21:15
-
-
Save gluxon/26f8a3fc41bf27c4a3b0189c52457c17 to your computer and use it in GitHub Desktop.
Setup ZSH on 3150 VMs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Modified from https://coderwall.com/p/ynq-nw/compiling-your-software-to-run-almost-anywhere-without-ever-using-root | |
set -ex | |
mkdir -p ~/.local | |
WORKDIR=`mktemp -d` | |
pushd "$WORKDIR" | |
export CPPFLAGS="-I$HOME/.local/include" | |
export LDFLAGS="-L$HOME/.local/lib" | |
export CFLAGS="-march=native -O2 -pipe -fPIC -fstack-protector" | |
export CXXFLAGS="$CFLAGS" | |
curl https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz | tar xz | |
cd ncurses-6.1 | |
./configure --prefix="$HOME/.local" | |
make && make install | |
cd .. | |
export CPPFLAGS="-I$HOME/.local/include -I$HOME/.local/include/ncurses" | |
export LDFLAGS="-L$HOME/.local/lib" | |
export CFLAGS="-march=native -O2 -pipe -fstack-protector" | |
export CXXFLAGS="$CFLAGS" | |
curl https://ayera.dl.sourceforge.net/project/zsh/zsh/5.4.2/zsh-5.4.2.tar.xz | tar xJ | |
cd zsh-5.4.2 | |
./configure --prefix="$HOME/.local" | |
make && make install | |
popd | |
rm -rf "$WORKDIR" | |
curl -L git.io/antigen > "$HOME/.local/bin/antigen.zsh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment