Skip to content

Instantly share code, notes, and snippets.

@atomlab
Forked from ZhaofengWu/install_zsh.sh
Created June 16, 2023 10:44
Show Gist options
  • Select an option

  • Save atomlab/7e8122aef53b9c29ab883fd67603e3bb to your computer and use it in GitHub Desktop.

Select an option

Save atomlab/7e8122aef53b9c29ab883fd67603e3bb to your computer and use it in GitHub Desktop.

Revisions

  1. @ZhaofengWu ZhaofengWu revised this gist Sep 9, 2022. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions install_zsh.sh
    Original file line number Diff line number Diff line change
    @@ -3,15 +3,14 @@
    set -e

    # zsh will not install without ncurses. If the machine doesn't have this library, it will need to be installed first.
    # Uncomment the following to do that.
    # export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/include" LDFLAGS="-L${HOME}/lib"
    # wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz
    # tar -xzvf ncurses-6.2.tar.gz
    # cd ncurses-6.2
    # ./configure --prefix=$HOME --enable-shared
    # make
    # make install
    # cd .. && rm ncurses-6.2.tar.gz && rm -r ncurses-6.2
    export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/include" LDFLAGS="-L${HOME}/lib"
    wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz
    tar -xzvf ncurses-6.2.tar.gz
    cd ncurses-6.2
    ./configure --prefix=$HOME --enable-shared
    make
    make install
    cd .. && rm ncurses-6.2.tar.gz && rm -r ncurses-6.2

    wget -O zsh.tar.xz https://sourceforge.net/projects/zsh/files/latest/download
    mkdir zsh && unxz zsh.tar.xz && tar -xvf zsh.tar -C zsh --strip-components 1
  2. @ZhaofengWu ZhaofengWu revised this gist Aug 25, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_zsh.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ cd zsh
    make
    make install
    cd .. && rm zsh.tar && rm -r zsh
    echo -e "export SHELL=/bin/zsh\nexec /bin/zsh -l" >> ~/.bashrc # or chsh
    echo -e "export SHELL=~/bin/zsh\nexec ~/bin/zsh -l" >> ~/.bash_profile # or chsh

    # Optional: install oh-my-zsh
    sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
  3. @ZhaofengWu ZhaofengWu revised this gist Aug 25, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_zsh.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ cd zsh
    make
    make install
    cd .. && rm zsh.tar && rm -r zsh
    echo "~/bin/zsh" >> ~/.bashrc # or chsh
    echo -e "export SHELL=/bin/zsh\nexec /bin/zsh -l" >> ~/.bashrc # or chsh

    # Optional: install oh-my-zsh
    sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
  4. @ZhaofengWu ZhaofengWu revised this gist Dec 15, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_zsh.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ set -e

    # zsh will not install without ncurses. If the machine doesn't have this library, it will need to be installed first.
    # Uncomment the following to do that.
    # export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/ncurses/include" LDFLAGS="-L${HOME}/ncurses/lib"
    # export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/include" LDFLAGS="-L${HOME}/lib"
    # wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz
    # tar -xzvf ncurses-6.2.tar.gz
    # cd ncurses-6.2
  5. @ZhaofengWu ZhaofengWu revised this gist Jan 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_zsh.sh
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ cd zsh
    make
    make install
    cd .. && rm zsh.tar && rm -r zsh
    echo "~/bin/zsh" >> ~/.bashrc
    echo "~/bin/zsh" >> ~/.bashrc # or chsh

    # Optional: install oh-my-zsh
    sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
  6. @ZhaofengWu ZhaofengWu revised this gist Dec 4, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install_zsh.sh
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,7 @@ cd zsh
    make
    make install
    cd .. && rm zsh.tar && rm -r zsh
    echo "~/bin/zsh" >> ~/.bashrc

    # Optional: install oh-my-zsh
    sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
  7. @ZhaofengWu ZhaofengWu renamed this gist Dec 4, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install.sh → install_zsh.sh
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@

    set -e

    # zsh will not install without ncurses. If the machine doesn't have this library,
    # it will need to be installed first. Uncomment the following (and the zsh make flag) to do that.
    # zsh will not install without ncurses. If the machine doesn't have this library, it will need to be installed first.
    # Uncomment the following to do that.
    # export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/ncurses/include" LDFLAGS="-L${HOME}/ncurses/lib"
    # wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz
    # tar -xzvf ncurses-6.2.tar.gz
    @@ -16,7 +16,7 @@ set -e
    wget -O zsh.tar.xz https://sourceforge.net/projects/zsh/files/latest/download
    mkdir zsh && unxz zsh.tar.xz && tar -xvf zsh.tar -C zsh --strip-components 1
    cd zsh
    ./configure --prefix=$HOME #--enable-shared
    ./configure --prefix=$HOME
    make
    make install
    cd .. && rm zsh.tar && rm -r zsh
  8. @ZhaofengWu ZhaofengWu revised this gist Dec 4, 2020. 1 changed file with 13 additions and 2 deletions.
    15 changes: 13 additions & 2 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,24 @@

    set -e

    # zsh will not install without ncurses. If the machine doesn't have this library,
    # it will need to be installed first. Uncomment the following (and the zsh make flag) to do that.
    # export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/ncurses/include" LDFLAGS="-L${HOME}/ncurses/lib"
    # wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz
    # tar -xzvf ncurses-6.2.tar.gz
    # cd ncurses-6.2
    # ./configure --prefix=$HOME --enable-shared
    # make
    # make install
    # cd .. && rm ncurses-6.2.tar.gz && rm -r ncurses-6.2

    wget -O zsh.tar.xz https://sourceforge.net/projects/zsh/files/latest/download
    mkdir zsh && unxz zsh.tar.xz && tar -xvf zsh.tar -C zsh --strip-components 1
    cd zsh
    ./configure --prefix=$HOME
    ./configure --prefix=$HOME #--enable-shared
    make
    make install
    cd .. && rm zsh.tar && rm -r zsh

    # Optional: install oh-my-zsh
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
  9. @ZhaofengWu ZhaofengWu revised this gist Dec 4, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    #!/bin/bash

    set -e

    wget -O zsh.tar.xz https://sourceforge.net/projects/zsh/files/latest/download
    mkdir zsh && unxz zsh.tar.xz && tar -xvf zsh.tar -C zsh --strip-components 1
    cd zsh
  10. @ZhaofengWu ZhaofengWu created this gist Oct 12, 2020.
    10 changes: 10 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    wget -O zsh.tar.xz https://sourceforge.net/projects/zsh/files/latest/download
    mkdir zsh && unxz zsh.tar.xz && tar -xvf zsh.tar -C zsh --strip-components 1
    cd zsh
    ./configure --prefix=$HOME
    make
    make install
    cd .. && rm zsh.tar && rm -r zsh

    # Optional: install oh-my-zsh
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"