# x-bash-test **Repository Path**: jzy-w/x-bash-test ## Basic Information - **Project Name**: x-bash-test - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-31 - **Last Updated**: 2021-11-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # shellcheck shell=sh disable=SC3043 DIR=`pwd` PREFIX="$DIR/tmux_build" mkdir -p $PREFIX cd $PREFIX ___build_libevent() { cd $PREFIX curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz tar -zxvf libevent-2.1.12-stable.tar.gz if [ $? -eq 0 ];then rm -f libevent-2.1.12-stable.tar.gz fi cd libevent-* ./configure --prefix=$PREFIX mingw32-make.exe && mingw32-make.exe install cd .. } ___build_ncurses() { curl -LO https://invisible-island.net/datafiles/release/ncurses.tar.gz tar zxvf ncurses.tar.gz if [ $? -eq 0 ];then rm -f ncurses.tar.gz fi cd ncurses-* ./configure --prefix=/c/Users/Administrator/Desktop/tmux_build/ncurses \ --with-default-terminfo-dir=/usr/share/terminfo \ --with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo" \ --enable-pc-files \ --with-pkg-config-libdir=/c/Users/Administrator/Desktop/tmux_build/build mingw32-make.exe && mingw32-make.exe install cd .. } ___build_tmux() { curl -LO https://github.com/tmux/tmux/releases/download/3.2a/tmux-3.2a.tar.gz tar zxvf tmux-* if [ $? -eq 0 ];then rm -f tmux-*.tar.gz fi cd tmux-* PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./configure --prefix=$PREFIX $1 mingw32-make.exe && mingw32-make.exe install cd .. } build(){ local osname="$(uname)" local static="" case "$osname" in Darwin) `brew install pkg-config` ;; Linux) static="--enable-static" if command -v apt >/dev/null; then `apt-get install -y gcc g++ make libffi-dev openssl libtool` elif command -v apk >/dev/null; then `apk add gcc g++ make libffi-dev openssl-dev libtool` else printf "WARN:Dependency is not installed normally" fi ;; esac ___build_libevent if [ $? -ne 0 ];then printf "ERROR:build libevent" return 1 fi ___build_ncurses if [ $? -ne 0 ];then printf "ERROR:build ncurses" return 1 fi ___build_tmux $static if [ $? -ne 0 ];then printf "ERROR:build tmux" return 1 fi } build if command -v brew ;then brew uninstall pkg-config fi