-
-
Save lambdalisue/5ee9530aafd61dd05c7c4ef7abcc7fc0 to your computer and use it in GitHub Desktop.
Install "zsh" on Ubuntu/Debian
This file contains hidden or 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/sh | |
# Build Zsh from sources on Ubuntu. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
if ! which porg >/dev/null 2>&1; then | |
echo 'A program manager "porg" is required.' | |
echo 'Install it via the following command' | |
echo '' | |
echo ' curl -sL git.io/vXTo7 | bash' | |
echo '' | |
echo 'Ref: https://gist.github.com/lambdalisue/161aa84af9a9ff7d3bfe9decfabf656a' | |
exit 1 | |
fi | |
set -e | |
unset rep | |
atexit() { | |
[[ -d "$rep" ]] && rm -rf $rep | |
} | |
trap atexit HUP INT QUIT TERM | |
rep=$(realpath $(mktemp -d zsh.XXXXXX)) | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone --depth 1 --single-branch http://git.code.sf.net/p/zsh/code $rep | |
cd $rep | |
./Util/preconfig | |
./configure --prefix=/usr/local \ | |
--enable-maildir-support \ | |
--enable-max-jobtable-size=256 \ | |
--enable-function-subdirs \ | |
--with-tcsetpgrp \ | |
--with-term-lib="ncursesw" \ | |
--enable-cap \ | |
--enable-pcre \ | |
--enable-readnullcmd=pager \ | |
--enable-custom-patchlevel=Debian \ | |
LDFLAGS="-Wl,--as-needed -g" | |
make -j $(grep -c '^processor' /proc/cpuinfo) | |
make check | |
sudo porg -lp 'zsh' 'make install' | |
sudo porg -lp 'zsh.info' 'make install.info' | |
atexit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://git.io/vXLAa