brew

https://github.com/homebrew/brew

Ruby

🍺 The missing package manager for macOS

Formula#plist

This method can be overridden to provide a plist.
For more examples read Apple's handy manpage:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/plist.5.html
<pre>def plist; <<-EOS.undent
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
   <key>Label</key>
     <string>#{plist_name}</string>
   <key>ProgramArguments</key>
   <array>
     <string>#{opt_bin}/example</string>
     <string>--do-this</string>
   </array>
   <key>RunAtLoad</key>
   <true/>
   <key>KeepAlive</key>
   <true/>
   <key>StandardErrorPath</key>
   <string>/dev/null</string>
   <key>StandardOutPath</key>
   <string>/dev/null</string>
 </plist>
 EOS
end</pre>

Source | Google | Stack overflow

Edit

git clone [email protected]:homebrew/brew.git

cd brew

open Library/Homebrew/formula.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Formula-plist-for-pr


# Commit to git

git add Library/Homebrew/formula.rbgit commit -m "better docs for Formula#plist"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Formula-plist-for-pr

hub pull-request


# Celebrate!