fix installation so that class is always reinstalled, even if already exists

This commit is contained in:
Rob Watson 2009-01-18 03:08:37 +00:00
parent ada7b34a3e
commit 431bfd50f9
1 changed files with 14 additions and 11 deletions

View File

@ -18,12 +18,15 @@ puts "Textmate SuperCollider bundle<br/>"
puts "by <a href='http://rfwatson.github.com'>R.Watson</a>.<br/>" puts "by <a href='http://rfwatson.github.com'>R.Watson</a>.<br/>"
puts "=======================================<br/><br/>" puts "=======================================<br/><br/>"
if File.exists?(File.expand_path("~/Library/Application Support/SuperCollider/Extensions/TextMate.sc")) fname = File.expand_path("~/Library/Application Support/SuperCollider/Extensions/TextMate.sc")
puts "<span style='color:green'>SuperCollider bundle already installed</span>.<br/>" if File.exists?(fname)
else #puts "<span style='color:green'>SuperCollider bundle already installed</span>.<br/>"
if not File.directory?(File.expand_path("~/Library/Application Support/SuperCollider/Extensions")) File.rename(fname, fname + '.bak')
end
if not File.directory?(File.expand_path("~/Library/Application Support/SuperCollider/Extensions"))
could_not_locate could_not_locate
else else
if system %Q{ln -s '#{ENV['TM_BUNDLE_SUPPORT']}/classes/TextMate.sc' '#{File.expand_path("~/Library/Application Support/SuperCollider/Extensions/TextMate.sc")}'} 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 "<span style='color:green'>Successfully installed TextMate class</span>.<br/><br/>"
puts "Relaunch SuperCollider to complete installation." puts "Relaunch SuperCollider to complete installation."
@ -31,8 +34,8 @@ else
puts "There was an error installing the class file.<br/><br/>" puts "There was an error installing the class file.<br/><br/>"
could_not_locate could_not_locate
end end
end
end end
</string> </string>
<key>fallbackInput</key> <key>fallbackInput</key>
<string>document</string> <string>document</string>