Last active
December 29, 2015 13:48
-
-
Save lpetre/7679232 to your computer and use it in GitHub Desktop.
homebrew recipe for the unity cache server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class UnityCache < Formula | |
homepage 'http://unity3d.com/unity/collaboration/' | |
url 'http://netstorage.unity3d.com/unity/CacheServer-4.5.5.zip' | |
sha1 'e56e288550dc48cfeaebcf9bba5f07ae566e1747' | |
depends_on 'node' | |
def install | |
%w[db/unity-cache log/unity-cache].each { |p| (var+p).mkpath } | |
libexec.install "CacheServer.js" | |
end | |
plist_options :manual => "#{HOMEBREW_PREFIX}/bin/node #{HOMEBREW_PREFIX}/opt/unity-cache/libexec/CacheServer.js --path #{HOMEBREW_PREFIX}/var/unity-cache" | |
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>#{HOMEBREW_PREFIX}/bin/node</string> | |
<string>#{HOMEBREW_PREFIX}/opt/unity-cache/libexec/CacheServer.js</string> | |
<string>--path</string> | |
<string>#{HOMEBREW_PREFIX}/var/unity-cache</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StandardOutPath</key> | |
<string>#{HOMEBREW_PREFIX}/var/log/unity-cache/access.log</string> | |
<key>StandardErrorPath</key> | |
<string>#{HOMEBREW_PREFIX}/var/log/unity-cache/error.log</string> | |
</dict> | |
</plist> | |
EOS | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment