diff options
| author | Adam Vandenberg | 2013-05-27 19:14:19 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-05-27 19:14:19 -0700 |
| commit | 1d38f9c0dbb0d97b1a8a651bd99ef48b18cc481a (patch) | |
| tree | b44b7ff7b02c80cc3012fe7dcddd5afe6d2c294a /Library | |
| parent | ee210d198a3540ff42d7f54e07f8496e224c2fcf (diff) | |
| download | homebrew-1d38f9c0dbb0d97b1a8a651bd99ef48b18cc481a.tar.bz2 | |
simplify Sickbeard
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/sickbeard.rb | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/Library/Formula/sickbeard.rb b/Library/Formula/sickbeard.rb index f8ef16103..1da040ad3 100644 --- a/Library/Formula/sickbeard.rb +++ b/Library/Formula/sickbeard.rb @@ -10,7 +10,7 @@ class Sickbeard < Formula depends_on 'Cheetah' => :python def install - prefix.install Dir['*'] + libexec.install Dir['*'] (bin+"sickbeard").write(startup_script) end @@ -25,11 +25,11 @@ class Sickbeard < Formula <string>#{plist_name}</string> <key>ProgramArguments</key> <array> - <string>#{opt_prefix}/bin/sickbeard</string> - <string>-q</string> - <string>--nolaunch</string> - <string>-p</string> - <string>8081</string> + <string>#{opt_prefix}/bin/sickbeard</string> + <string>-q</string> + <string>--nolaunch</string> + <string>-p</string> + <string>8081</string> </array> <key>RunAtLoad</key> <true/> @@ -39,28 +39,15 @@ class Sickbeard < Formula end def startup_script; <<-EOS.undent - #!/usr/bin/env ruby - - me = begin - File.expand_path( - File.join( - File.dirname(__FILE__), - File.readlink(__FILE__) - ) - ) - rescue - __FILE__ - end - - path = File.join(File.dirname(me), '..', 'SickBeard.py') - args = ["--pidfile=#{var}/run/sickbeard.pid", "--datadir=#{etc}/sickbeard"] - - exec("python", path, *(args + ARGV)) + #!/bin/bash + python "#{libexec}/SickBeard.py"\ + "--pid_file=#{var}/run/sickbeard.pid"\ + "--data_dir=#{etc}/sickbeard"\ + "$@" EOS end - def caveats; <<-EOS.undent - SickBeard defaults to port 8081. - EOS + def caveats + "SickBeard defaults to port 8081." end end |
