Last active
August 29, 2017 22:20
-
-
Save erkkel/87354d3f68163e222b8ea94c6334fc55 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Taken from https://gist.github.com/xiaom/8264691. Massive kudos for coming up with 95% of the logic. | |
# This version has been tweaked to work with the most recent versions of mosh and protobuf as of Aug 29 2017 | |
# Example usage: mosh --server=/home/cc/eecs151/fa17/class/eecs151-aba/local/bin/mosh-server [email protected] | |
mkdir mosh | |
cd mosh | |
ROOT=`pwd` | |
echo "===================================" | |
echo "about to set up everything in $ROOT" | |
echo "===================================" | |
mkdir build | |
mkdir install | |
cd build | |
curl -O https://codeload.github.com/google/protobuf/tar.gz/v3.4.0 | |
curl -O https://mosh.org/mosh-1.3.2.tar.gz | |
tar zxvf v3.4.0 | |
tar zxvf mosh-1.3.2.tar.gz | |
echo "=================" | |
echo "building protobuf" | |
echo "=================" | |
cd $ROOT/build/protobuf-3.4.0 | |
export CXXFLAGS="$CXXFLAGS -fPIC" | |
./autogen.sh | |
./configure --prefix=$HOME/local --disable-shared | |
make install | |
echo "=============" | |
echo "building mosh" | |
echo "=============" | |
cd $ROOT/build/mosh-1.3.2 | |
export PROTOC=$HOME/local/bin/protoc | |
export protobuf_CFLAGS=-I$HOME/local/include | |
export protobuf_LIBS=$HOME/local/lib/libprotobuf.a | |
./autogen.sh | |
./configure --prefix=$HOME/local | |
make install | |
echo "===" | |
echo "if all was successful, binaries are now in $HOME/local/bin/" | |
echo "===" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment