Created
October 1, 2016 02:26
-
-
Save amagura/8cbe97892c2425daeec6daa39b57af3f to your computer and use it in GitHub Desktop.
Installing Zsh on a server without root access
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
_prefix="$HOME/pre" | |
prepare() { | |
# set correct keymap path | |
# FIXME this may not work at RRD since their Linux servers aren't Arch Linux based | |
sed -i 's#/usr/share/keymaps#/usr/share/kbd/keymaps#g' Completion/Unix/Command/_loadkeys | |
# Fix usb.ids path | |
# FIXME I don't know if this is necessary/will even work at RRD | |
sed -i 's#/usr/share/misc/usb.ids#/usr/share/hwdata/usb.ids#g' Completion/Linux/Command/_lsusb | |
# Remove unneeded and conflicting completion scripts | |
# FIXME this definitely probably won't work at RRD | |
for _fpath in AIX BSD Cygwin Darwin Debian Mandriva openSUSE Redhat Solaris; do | |
rm -rf Completion/$_fpath | |
sed "s#\s*Completion/$_fpath/\*/\*##g" -i Src/Zle/complete.mdd | |
done | |
rm Completion/Linux/Command/_{pkgtool,rpmbuild} | |
} | |
build() { | |
./configure --prefix="$_prefix"/usr \ | |
--docdir="$_prefix"/usr/share/doc/zsh \ | |
--htmldir="$_prefix"/usr/share/doc/zsh/html \ | |
--enable-etcdir="$_prefix"/etc/zsh \ | |
--enable-zshenv="$_prefix"/etc/zsh/zshenv \ | |
--enable-zlogin="$_prefix"/etc/zsh/zlogin \ | |
--enable-zlogout="$_prefix"/etc/zsh/zlogout \ | |
--enable-zprofile="$_prefix"/etc/zsh/zprofile \ | |
--enable-zshrc="$_prefix"/etc/zsh/zshrc \ | |
--disable-maildir-support \ | |
--with-term-lib='ncursesw' \ | |
--enable-multibyte \ | |
--enable-function-subdirs \ | |
--enable-fndir="$_prefix"/usr/share/zsh/functions \ | |
--enable-scriptdir="$_prefix"/usr/share/zsh/scripts \ | |
--with-tcsetpgrp \ | |
--enable-pcre \ | |
--enable-zsh-secure-free | |
make | |
} | |
check() { | |
make check | |
} | |
package() { | |
make install | |
make install.info install.html | |
} | |
prepare | |
build | |
check | |
package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment