<commit_before>PREFIX=$HOME
PROTOBUF_VERSION=3.6.1
MOSH_VERSION=1.3.2

# Install Protocol Buffers
wget https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-all-$PROTOBUF_VERSION.tar.gz
tar -xf protobuf-all-$PROTOBUF_VERSION.tar.gz 
cd protobuf-$PROTOBUF_VERSION 
./configure --prefix=$PREFIX
make
make install
cd ..

# You'll need this setting to have mosh find the Protocol Buffer lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

# Install mosh
wget https://github.com/mobile-shell/mosh/releases/download/mosh-$MOSH_VERSION/mosh-$MOSH_VERSION.tar.gz
tar -xf mosh-$MOSH_VERSION.tar.gz 
cd mosh-$MOSH_VERSION
./configure --prefix=$PREFIX
make
make install

echo "You can run this to verify the install worked:"
echo "  $ export LD_LIBRARY_PATH=$PREFIX/lib"
echo "  $ mosh-server"
echo "(Running mosh-server should give you a pid and a key to use if you want to connect manually)"

echo "To connect to the server in the future, run this on your local machine:"
echo "  $ mosh --server="LD_LIBRARY_PATH=$PREFIX/lib $PREFIX/bin/mosh-server" $USER@$(hostname -f)"<commit_msg>Found updated version of install script<commit_after>#!/usr/bin/env bash

# Copied from: https://gist.github.com/jaywilliams/c9ffab789b3f622abc932dd4cfaaeef5

# Thanks to @samsonjs for the cleaned up version:
# https://gist.github.com/samsonjs/4076746

PREFIX=$HOME/local
VERSION=1.3.2

# Create Source Directory
mkdir -p $PREFIX/src
cd $PREFIX/src

# Install Protocol Buffers
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar -xf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1
./configure --prefix=$PREFIX
make
make install
cd ..

# Install Ncurses (This was needed on CentOS, probably not necessary on Dreamhost)
wget https://invisible-mirror.net/archives/ncurses/ncurses-5.9.tar.gz
tar -xf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=$PREFIX --with-shared --without-debug  --without-normal
make
make install
cd ..

# You'll need this setting to have mosh find the Protocol Buffer lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
export PATH=$PREFIX/bin:$PATH

# Install mosh (Link to our curses library)
wget https://mosh.org/mosh-$VERSION.tar.gz
tar -xf mosh-$VERSION.tar.gz
cd mosh-$VERSION
./configure --prefix=$PREFIX --with-curses=$PREFIX
make
make install

# Post-Install Notes
echo 'To connect to the mosh server, run this on your local machine:'
echo "    $ mosh --server=\"LD_LIBRARY_PATH=$PREFIX/lib $PREFIX/bin/mosh-server\" $USER@$(hostname -f)"

echo 'Or add following lines to your ~/.bashrc (or other applicable shell) file:'
echo "    export LD_LIBRARY_PATH=$PREFIX/lib"
echo "    export PATH=$PREFIX/bin:\$PATH"
echo 'Afterwards, you can simply run this on your local machine:'
echo "    $ mosh $USER@$(hostname -f)"
{'fraction_non_alphanumeric': 0.12298314808174973, 'fraction_numerical': 0.016851918250268914, 'mean_word_length': 4.43859649122807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '179296', 'n_tokens_mistral': 970, 'n_tokens_neox': 943, 'n_words': 265}