beforeRunningCommand nop command #!/usr/bin/env ruby def could_not_locate puts "<span style='color:red'>There was a problem</span><br/>" puts "Probably, you do not have SuperCollider installed, or you are using a non-standard user support directory.<br/><br/>" puts "You will need to manually copy <code>supercollider-tmbundle/Support/classes/TextMate.sc</code> into your SC class path" end puts "=======================================<br/>" puts "Textmate SuperCollider bundle<br/>" puts "by <a href='http://rfwatson.github.com'>R.Watson</a>.<br/>" puts "=======================================<br/><br/>" fname = File.expand_path("~/Library/Application Support/SuperCollider/Extensions/TextMate.sc") if File.exists?(fname) #puts "<span style='color:green'>SuperCollider bundle already installed</span>.<br/>" File.rename(fname, fname + '.bak') end if not File.directory?(File.expand_path("~/Library/Application Support/SuperCollider/Extensions")) could_not_locate else if system %Q{ln -s '#{ENV['TM_BUNDLE_SUPPORT']}/classes/TextMate.sc' '#{File.expand_path("~/Library/Application Support/SuperCollider/Extensions/TextMate.sc")}'} puts "<span style='color:green'>Successfully installed TextMate class</span>.<br/><br/>" puts "Relaunch SuperCollider to complete installation." else puts "There was an error installing the class file.<br/><br/>" could_not_locate end end fallbackInput document input selection keyEquivalent $@ name Install output showAsHTML scope source.supercollider uuid BB37ACE9-8262-4AF6-B3C6-43DC0AF2B370