Skip to content

Instantly share code, notes, and snippets.

@simon-brooke
Created August 16, 2016 14:20
Show Gist options
  • Save simon-brooke/754a29966e2b0a87868ca99e2cde8c8c to your computer and use it in GitHub Desktop.
Save simon-brooke/754a29966e2b0a87868ca99e2cde8c8c to your computer and use it in GitHub Desktop.
Launcher for LightTable, which also launches Butterfly. Butterfly is a terminal in a browser window, which can be connected to inside LightTable by pointing a browser connection at http://localhost:57575
#!/bin/bash
# Experimental launcher for LightTable; starts Butterfly if it is not
# already running, in order to have a terminal which works inside
# LightTable
if [ "$#" != "0" ]
then
shift
fi
# Check whether butterfly is running on port 57575 (its default port)
lsof -i :57575 | grep butterfly > /dev/null
# If not, start it
if [ $? -ne 0 ]
then
/usr/local/bin/butterfly.server.py --unsecure &
fi
/usr/local/lib/LightTable/LightTable $* &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment