Skip to content

Instantly share code, notes, and snippets.

@thefotios
Forked from eerohele/mosh-cygwin.md
Created July 17, 2012 19:44
Show Gist options
  • Save thefotios/3131534 to your computer and use it in GitHub Desktop.
Save thefotios/3131534 to your computer and use it in GitHub Desktop.
Compiling Mosh (http://mosh.mit.edu/) under Cygwin
#!/usr/bin/env bash
fetch_and_install(){
# Make a temporary directory for all installation files
OUT=$(mktemp /tmp/mosh_install.XXX) || { echo "Failed to create temp file"; exit 1; }
pushd $OUT > /dev/null
curl -o package.tar.gz $1
tar xvzf package.tar.gz /tmp/ -C package
pushd package > /dev/null
./configure $2
make && make install
popd > /dev/null
popd > /dev/null
rm -rf $OUT
}
fetch_and_install http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
fetch_and_install https://github.com/downloads/keithw/mosh/mosh-1.2.2.tar.gz 'CPPFLAGS="-I/usr/include/ncurses" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/'
  1. Download Cygwin

  2. Run setup with the following command

    setup.exe -P make,boost,libncurses-devel,pkg-config,perl -q
    
  3. Download and compile Protocol Buffers: http://code.google.com/p/protobuf/

    $ tar xvvf protobuf-2.4.1.tar.gz
    $ cd protobuf-2.4.1
    $ ./configure
    $ make
    $ make install
    
  4. Download and compile Mosh: http://mosh.mit.edu/

    $ tar zxvf mosh-1.1.3.tar.gz
    $ cd mosh-1.1.3
    $ ./configure CPPFLAGS="-I/usr/include/ncurses" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
    $ make
    $ make install
    
  5. Install the IO::Pty Perl module:

    $ perl -MCPAN -e shell
    cpan> install IO::Pty
    
  6. Rock’n’roll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment