Clean up some unnecessary Pathname usage

This commit is contained in:
Jack Nagel 2014-04-01 12:43:32 -05:00
parent 00acebd9cc
commit b9ce139ee7
4 changed files with 7 additions and 7 deletions

View file

@ -21,9 +21,9 @@ class Jena < Formula
prefix.install %w{ LICENSE ReleaseNotes-Jena.txt NOTICE ReleaseNotes-TDB.txt README ReleaseNotes-ARQ.txt }
doc.install ['javadoc-arq', 'javadoc-core', 'javadoc-sdb', 'javadoc-tdb', 'src-examples']
libexec.install Dir['*']
Dir["#{libexec}/bin/*"].map { |p| Pathname.new p }.each { |path|
bin_name = path.basename
Dir["#{libexec}/bin/*"].each do |path|
bin_name = File.basename(path)
(bin+bin_name).write shim_script(bin_name)
}
end
end
end

View file

@ -24,7 +24,7 @@ class Luciddb < Formula
end
Dir["#{libexec}/bin/*"].each do |b|
next if b =~ /classpath.gen/ or b =~ /defineFarragoRuntime/
n = Pathname.new(b).basename
n = File.basename(b)
(bin+n).write shim_script(n)
end
end

View file

@ -66,7 +66,7 @@ class Node < Formula
(lib/"node_modules/npm/npmrc").write("prefix = #{npm_prefix}\n")
# Link npm manpages
Pathname.glob("#{lib}/node_modules/npm/man/*").each do |man|
Pathname.glob("#{lib}/node_modules/npm/man/*") do |man|
dir = send(man.basename)
man.children.each { |file| dir.install_symlink(file) }
end

View file

@ -101,12 +101,12 @@ class Zookeeper < Formula
(var+'run/zookeeper/data').mkpath
# Install shim scripts to bin
Dir["#{libexec}/bin/*.sh"].map { |p| Pathname.new p }.each { |path|
Pathname.glob("#{libexec}/bin/*.sh") do |path|
next if path == libexec+'bin/zkEnv.sh'
script_name = path.basename
bin_name = path.basename '.sh'
(bin+bin_name).write shim_script(script_name)
}
end
# Install default config files
defaults = etc/'zookeeper/defaults'