Skip to content

Instantly share code, notes, and snippets.

@vjt
Created April 12, 2010 11:36
Show Gist options
  • Save vjt/363472 to your computer and use it in GitHub Desktop.
Save vjt/363472 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Glue script to make a lessc compiler installed via RVM to work nicely
# with the Textmate Less Bundle (http://github.com/appden/less.tmbundle)
# - [email protected] - Public Domain
#
# Replace the following with the rvm Ruby version you want lessc run with
#
RUBY=ruby-1.9.1-p378@some_gem_set
export GEM_HOME=`echo ~/.rvm/gems/$RUBY`
INPUT=$TM_FILEPATH
# By default, the output file is put beneath the directory in which resides,
# if you keep .less and .css in the same directory you should use
# OUTPUT=`dirname $INPUT`
#
OUTPUT=`dirname $INPUT`/../`basename $INPUT`
~/.rvm/gems/$RUBY/bin/lessc $INPUT $OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment