Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (24 sloc) 0.792 kb
234cb1c Refactor BBEdit and TextWrangler to separate scripts
Andrew Carter authored
1 #!/usr/bin/env/rake
2
3 task :default => [ :all ]
4
5 desc "Install BBEdit script"
6 task :bbedit do
7 install_script('bbedit')
8 end
9
10 desc "Install TextWrangler script"
11 task :textwrangler do
12 install_script('textwrangler')
13 end
14
15 desc "Install all scripts (BBEdit and TextWrangler)"
16 task :all => [ :bbedit, :textwrangler ]
17
18 def install_script(app)
19 source = File.expand_path("#{app}.applescript", File.dirname(__FILE__))
20
21 # Copy to all application support directories in use
22 %w(~/Dropbox ~/Library).each do |root|
23 target_root = File.join(File.expand_path(root), "Application Support", app, "Scripts")
24
25 if File.directory?(target_root)
26 target = File.join(target_root, "PeepOpen.applescript")
27 puts "Installing #{target}"
28 FileUtils.cp(source, target)
29 end
30 end
31 end
Something went wrong with that request. Please try again.