Skip to content

Instantly share code, notes, and snippets.

@ViViDboarder
Last active September 9, 2023 02:05
Show Gist options
  • Save ViViDboarder/11000123 to your computer and use it in GitHub Desktop.
Save ViViDboarder/11000123 to your computer and use it in GitHub Desktop.

Revisions

  1. ViViDboarder revised this gist Nov 11, 2014. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions install-user-mosh.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,5 @@
    #! /bin/bash

    # Get the working dir
    working=$(pwd)

    # Make a directory to hold local libs and bins
    mkdir -p ~/usr/local

    @@ -23,7 +20,7 @@ fi
    cd ..

    # Clone mosh
    git clone https://github.com/keithw/mosh
    git clone --depth 1 https://github.com/keithw/mosh
    cd mosh

    # Set the path for pkgconfig
  2. ViViDboarder created this gist Apr 17, 2014.
    42 changes: 42 additions & 0 deletions install-user-mosh.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    #! /bin/bash

    # Get the working dir
    working=$(pwd)

    # Make a directory to hold local libs and bins
    mkdir -p ~/usr/local

    # Get protobuf
    wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
    # Extract protobuf
    tar -xvzf protobuf-2.5.0.tar.gz
    cd protobuf-2.5.0
    # Configure and install
    ./configure --prefix=$HOME/usr/local && make && make check && make install

    if [ $? -ne 0 ]; then
    echo "Error compiling protobuf"
    exit 1
    fi

    # Exit the protobuf directory
    cd ..

    # Clone mosh
    git clone https://github.com/keithw/mosh
    cd mosh

    # Set the path for pkgconfig
    export PKG_CONFIG_PATH=$HOME/usr/local/lib/pkgconfig
    export PATH=$HOME/usr/local/bin:$PATH
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/local/lib
    # Do the configure and install
    ./autogen.sh
    ./configure --prefix=$HOME/usr/local && make && make install

    echo ""

    echo "Make sure the following lines are in your bashrc"
    echo 'export PATH=$HOME/usr/local/bin:$PATH'
    echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/local/lib'