Last active
June 22, 2022 14:19
-
-
Save advilm/c3cfe0674dd33d889cd74457a22f4274 to your computer and use it in GitHub Desktop.
Installs zsh on lab servers
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
# install ncurses | |
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.3.tar.gz | |
tar -xzf ncurses-6.3.tar.gz | |
rm ncurses-6.3.tar.gz | |
cd ncurses-6.3 | |
./configure --prefix="$HOME/.local" --with-shared --without-debug --enable-widec | |
make && make install | |
cd .. | |
rm -rf ncurses-6.3 | |
# some flags | |
export CXXFLAGS="-fPIC" | |
export CFLAGS="-fPIC" | |
export NCURSES_HOME="$HOME/.local" | |
export PATH=$NCURSES_HOME/bin:$PATH | |
export LD_LIBRARY_PATH=$NCURSES_HOME/lib:$LD_LIBRARY_PATH | |
export CPPFLAGS="-I$NCURSES_HOME/include" LDFLAGS="-L$NCURSES_HOME/lib" | |
# install zsh | |
wget https://versaweb.dl.sourceforge.net/project/zsh/zsh/5.9/zsh-5.9.tar.xz | |
xz -d zsh-5.9.tar.xz | |
tar -xf zsh-5.9.tar | |
rm zsh-5.9.tar | |
cd zsh-5.9 | |
./configure --prefix="$HOME/.local" | |
make && make install | |
cd .. | |
rm -rf zsh-5.9 | |
# install antibody | |
curl -sfL git.io/antibody | sh -s - -b "$HOME/.local/bin" | |
# install dotfiles | |
cd ~ | |
if [ ! -f ".zshrc" ]; then wget https://raw.githubusercontent.com/advilm/dotfiles/master/.zshrc; fi | |
if [ ! -f ".zsh_plugins" ]; then wget https://raw.githubusercontent.com/advilm/dotfiles/master/.zsh_plugins; fi | |
if [ ! -f ".p10k.zsh" ]; then wget https://raw.githubusercontent.com/advilm/dotfiles/master/.p10k.zsh; fi | |
# update bashrc | |
grep -qxF '~/.local/bin/zsh; exit' .bashrc || echo '~/.local/bin/zsh; exit' >> .bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment