Browse files

Create missing app script directories

This will automatically create the app-specific Scripts directory,
provided the app directory exists. Given my current setup, this puts
the scripts in ~/Library/Adium/Scripts and ~/Library/iTunes/Scripts
correctly as well as ~/Library/Scripts.

I may take the `app_dir` conditional out, though. This would create
~/Library/DJ/Scripts, which might be a good thing.
  • Loading branch information...
1 parent 0b9232d commit ebcfdef8de2a36c741803d4fd7af763d1e53ca1a @ymendel committed Aug 12, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 Rakefile
6 Rakefile
@@ -84,8 +84,10 @@ task :install_scripts, :mode do |t, args|
targets.push "#{script_dir}/#{file}"
- target_dir = "#{ENV["HOME"]}/Library/#{linkable_split[1]}/Scripts"
- if
+ app_dir = "#{ENV['HOME']}/Library/#{linkable_split[1]}"
+ if
+ target_dir = "#{app_dir}/Scripts"
+ FileUtils.mkdir_p target_dir
file = linkable_split[2..-1].join(' ')
targets.push "#{target_dir}/#{file}"

0 comments on commit ebcfdef

Please sign in to comment.