-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: lizz <[email protected]>
- Loading branch information
Showing
3 changed files
with
31 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set ssl:verify-certificate no |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LogLevel ERROR |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,42 @@ | ||
# Installs Zsh | ||
set -e | ||
|
||
ROOTDIR=${ZZROOT:-$HOME/app} | ||
NAME="zsh" | ||
TYPE=".tar.gz" | ||
FILE="$NAME$TYPE" | ||
DOWNLOADURL="https://github.com/zsh-users/zsh/archive/zsh-5.7.1.tar.gz" | ||
echo $NAME will be installed in $ROOTDIR | ||
echo install ncurses first! | ||
|
||
ZSH_INSTALL_DIR=$HOME/app/zsh | ||
mkdir -p $ZSH_INSTALL_DIR | ||
mkdir -p $ROOTDIR/downloads | ||
cd $ROOTDIR | ||
|
||
# Set cflags and c++ flags to compile with Position Independent Code enabled which we need for compiling zsh | ||
export CXXFLAGS=' -fPIC' | ||
export CFLAGS=' -fPIC' | ||
if [ -f "downloads/$FILE" ]; then | ||
echo "downloads/$FILE exist" | ||
else | ||
echo "$FILE does not exist, downloading..." | ||
wget $DOWNLOADURL -O $FILE | ||
mv $FILE downloads/ | ||
fi | ||
|
||
# Tell environment where ncurses is | ||
INSTALL_PATH="$HOME/app/ncurses" | ||
export PATH=$INSTALL_PATH/bin:$PATH | ||
export LD_LIBRARY_PATH=$INSTALL_PATH/lib:$LD_LIBRARY_PATH | ||
export CFLAGS=-I$INSTALL_PATH/include | ||
export CPPFLAGS="-I$INSTALL_PATH/include" LDFLAGS="-L$INSTALL_PATH/lib" | ||
mkdir -p src/$NAME | ||
tar xf downloads/$FILE -C src/$NAME --strip-components 1 | ||
|
||
# Zsh | ||
cd $ZSH_INSTALL_DIR | ||
cd src/$NAME | ||
|
||
# Get zsh | ||
git clone git://github.com/zsh-users/zsh.git | ||
|
||
# Move into root zsh source directory | ||
cd zsh | ||
export CXXFLAGS=' -fPIC' | ||
export CFLAGS=' -fPIC' | ||
export PATH=$ROOTDIR/bin:$PATH | ||
export LD_LIBRARY_PATH=$ROOTDIR/lib:$LD_LIBRARY_PATH | ||
export CFLAGS=-I$ROOTDIR/include | ||
export CPPFLAGS="-I$ROOTDIR/include" LDFLAGS="-L$ROOTDIR/lib" | ||
|
||
# Produce config.h.in, needed to produce config.status from ./configure | ||
autoheader | ||
|
||
# Produce the configure file from aclocal.m4 and configure.ac | ||
autoconf | ||
|
||
# Produce Makefile and config.h via config.status | ||
./configure --prefix=$ZSH_INSTALL_DIR --enable-shared | ||
./configure --prefix=$ROOTDIR --enable-shared | ||
make -j && make install | ||
|
||
echo $NAME installed on $ROOTDIR | ||
echo put this in .bashrc | ||
echo '[ -f $HOME/app/zsh/bin/zsh ] && exec $HOME/app/zsh/bin/zsh -l' | ||
echo exec $ROOTDIR/bin/zsh -l |