Start cleanup of mosh install

This commit is contained in:
ViViDboarder 2021-11-29 09:54:48 -08:00
parent 101ff729f8
commit def488e896
1 changed files with 48 additions and 42 deletions

View File

@ -1,52 +1,56 @@
#! /bin/bash #! /bin/bash
set -e set -e
read -p "Compile protobuf? [Yn] " -n 1 -r cd "$TMP_DIR"
echo
if [[ "$REPLY" =~ ^[Yy]$ ]]; then
# Get library
v=protobuf-2.5.0
wget "https://protobuf.googlecode.com/files/${v}.tar.gz"
# Extract library
tar -xvzf "${v}.tar.gz"
cd $v
# Configure and install
./configure --prefix="$LOCAL_PREFIX" && make && make check && make install
# shellcheck disable=2181 sudo_package automake libtool g++ protobuf-compiler libprotobuf-dev libboost-dev libutempter-dev libncurses5-dev zlib1g-dev libio-pty-perl libssl-dev pkg-config
if [ $? -ne 0 ]; then
echo "Error compiling $v"
exit 1
fi
# Exit the library directory # read -p "Compile protobuf? [Yn] " -n 1 -r
cd .. # echo
fi # if [[ "$REPLY" =~ ^[Yy]$ ]]; then
# # Get library
read -p "Compile ncurses? [Yn] " -n 1 -r # v=protobuf-2.5.0
echo # wget "https://protobuf.googlecode.com/files/${v}.tar.gz"
if [[ $REPLY =~ ^[Yy]$ ]]; then # # Extract library
# Get library # tar -xvzf "${v}.tar.gz"
v=ncurses-5.9 # cd $v
wget http://ftp.gnu.org/pub/gnu/ncurses/${v}.tar.gz # # Configure and install
# Extract library # ./configure --prefix="$LOCAL_PREFIX" && make && make check && make install
tar -xvzf ${v}.tar.gz #
cd $v # # shellcheck disable=2181
# Configure and install # if [ $? -ne 0 ]; then
./configure --with-shared --prefix="$LOCAL_PREFIX" && make && make install # echo "Error compiling $v"
# exit 1
# shellcheck disable=2181 # fi
if [ $? -ne 0 ]; then #
echo "Error compiling $v" # # Exit the library directory
exit 1 # cd ..
fi # fi
#
# Exit the library directory # read -p "Compile ncurses? [Yn] " -n 1 -r
cd .. # echo
fi # if [[ $REPLY =~ ^[Yy]$ ]]; then
# # Get library
# v=ncurses-5.9
# wget http://ftp.gnu.org/pub/gnu/ncurses/${v}.tar.gz
# # Extract library
# tar -xvzf ${v}.tar.gz
# cd $v
# # Configure and install
# ./configure --with-shared --prefix="$LOCAL_PREFIX" && make && make install
#
# # shellcheck disable=2181
# if [ $? -ne 0 ]; then
# echo "Error compiling $v"
# exit 1
# fi
#
# # Exit the library directory
# cd ..
# fi
# Clone mosh # Clone mosh
git clone --depth 1 https://github.com/keithw/mosh git clone --depth 1 https://github.com/mobile-shell/mosh
cd mosh cd mosh
# Set the path for pkgconfig # Set the path for pkgconfig
@ -63,3 +67,5 @@ echo "Make sure the following lines are in your bashrc"
echo "export PATH=$LOCAL_PREFIX/bin:"'$PATH' echo "export PATH=$LOCAL_PREFIX/bin:"'$PATH'
# shellcheck disable=2016 # shellcheck disable=2016
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'"$LOCAL_PREFIX/lib" echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'"$LOCAL_PREFIX/lib"
cd "$TMP_DIR/.."