Skip to content

Commit

Permalink
bagit: simplify install to libexec
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Feb 27, 2014
1 parent cc08b94 commit 549871b
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Formula/bagit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ class Bagit < Formula
sha1 'a5f42372dcbe75f44d9181dd8edc8e6f18b68ec9'

def install
inreplace "conf/log4j.properties", "${app.home}/logs", "#{var}/log/bagit"
# put logs in var, not in the Cellar
(var/'log/bagit').mkpath
inreplace "conf/log4j.properties", "${app.home}/logs", "#{var}/log/bagit"

prefix.install 'conf'

libexec.install Dir['lib/*']

# Point to libexec, and move conf file
inreplace "bin/bag" do |s|
s.gsub! "$APP_HOME/lib", "$APP_HOME/libexec"
s.gsub! "/bin/$APP_NAME.classworlds.conf", "/conf/$APP_NAME.classworlds.conf"
end
inreplace "bin/bag.classworlds.conf", "${app.home}/lib", "${app.home}/libexec"
libexec.install Dir['*']

bin.install 'bin/bag'
(prefix+'conf').install 'bin/bag.classworlds.conf'
bin.install_symlink libexec/"bin/bag"
end

test do
Expand Down

0 comments on commit 549871b

Please sign in to comment.