aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-05-27 19:12:40 -0700
committerAdam Vandenberg2013-05-27 19:12:40 -0700
commitee210d198a3540ff42d7f54e07f8496e224c2fcf (patch)
treec4436bb41e57bc528c866acc65f7443bd8a76aa9 /Library
parent166b36448f73297641271452121ce93eef81e655 (diff)
downloadhomebrew-ee210d198a3540ff42d7f54e07f8496e224c2fcf.tar.bz2
simplify CouchPotatoServer
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/couchpotatoserver.rb30
1 files changed, 9 insertions, 21 deletions
diff --git a/Library/Formula/couchpotatoserver.rb b/Library/Formula/couchpotatoserver.rb
index 1d9656414..211508462 100644
--- a/Library/Formula/couchpotatoserver.rb
+++ b/Library/Formula/couchpotatoserver.rb
@@ -8,7 +8,8 @@ class Couchpotatoserver < Formula
head 'https://github.com/RuudBurger/CouchPotatoServer.git'
def install
- prefix.install Dir['*']
+ prefix.install_metafiles
+ libexec.install Dir['*']
(bin+"couchpotatoserver").write(startup_script)
end
@@ -37,28 +38,15 @@ class Couchpotatoserver < 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), '..', 'CouchPotato.py')
- args = ["--pid_file=#{var}/run/couchpotatoserver.pid", "--data_dir=#{etc}/couchpotatoserver"]
-
- exec("python", path, *(args + ARGV))
+ #!/bin/bash
+ python "#{libexec}/CouchPotato.py"\
+ "--pid_file=#{var}/run/couchpotatoserver.pid"\
+ "--data_dir=#{etc}/couchpotatoserver"\
+ "$@"
EOS
end
- def caveats; <<-EOS.undent
- CouchPotatoServer defaults to port 5050.
- EOS
+ def caveats
+ "CouchPotatoServer defaults to port 5050."
end
end