Created
March 30, 2017 09:27
-
-
Save lvzongting/401aade80bd7378e67953de9c1e219ec to your computer and use it in GitHub Desktop.
install_mosh_locally.sh install mosh from source without root permission
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
#!/bin/sh | |
# this script does absolutely ZERO error checking. however, it worked | |
# for me on a RHEL 6.5 machine on 2017-03-30. clearly, the version numbers | |
# and/or URLs should be made variables. cheers, [email protected] | |
# fork from https://gist.github.com/xiaom/8264691 | |
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://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz | |
curl -O https://github.com/mobile-shell/mosh/releases/download/mosh-1.2.5/mosh-1.2.5.tar.gz | |
tar zxvf protobuf-2.6.1.tar.gz | |
tar zxvf mosh-1.2.5.tar.gz | |
echo "=================" | |
echo "building protobuf" | |
echo "=================" | |
cd $ROOT/build/protobuf-2.6.1 | |
./configure --prefix=$HOME/local --disable-shared CXXFLAGS=-fPIC | |
make install | |
echo "=============" | |
echo "building mosh" | |
echo "=============" | |
cd $ROOT/build/mosh-1.2.5 | |
export PROTOC=$HOME/local/bin/protoc | |
export protobuf_CFLAGS=-I$HOME/local/include | |
export protobuf_LIBS=$HOME/local/lib/libprotobuf.a | |
./configure --prefix=$HOME/local | |
make install | |
echo "===" | |
echo "if all was successful, binaries are now in $ROOT/install/mosh/bin" | |
echo "===" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment