Skip to content

Commit

Permalink
create Library/LaunchAgents if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Nov 27, 2019
1 parent 020988a commit 0bd8eff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/setupmymac
Expand Up @@ -372,6 +372,11 @@ if Process.uid != 0 and option != :docker
plist = "#{Dir.home}/Library/LaunchAgents/toucher.plist"
contents = File.read("#{__dir__}/toucher.plist")
contents[/>(.*ruby.*)</, 1] = RbConfig.ruby

if not Dir.exist? File.dirname(plist)
run "mkdir -p #{File.dirname(plist)}"
end

if not File.exist?(plist) or File.read(plist) != contents
color "$ edit #{plist}"
File.write plist, contents
Expand Down

0 comments on commit 0bd8eff

Please sign in to comment.