diff options
| author | Jack Nagel | 2014-09-29 14:42:12 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-09-29 14:42:12 -0500 |
| commit | 7399c71d68eda950c88598ede4e1ed4536fb4a54 (patch) | |
| tree | d5ded9e6ea572df5d41ad225868c1ec2ec8485ae /Library/Formula | |
| parent | 47637c5c8f15fa34e685d8dcf1dd6be8f7979b34 (diff) | |
| download | homebrew-7399c71d68eda950c88598ede4e1ed4536fb4a54.tar.bz2 | |
Pass arrays to inreplace instead of looping
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/clozure-cl.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/fits.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/libunwind-headers.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/shrewsoft-vpn-client.rb | 5 |
4 files changed, 8 insertions, 14 deletions
diff --git a/Library/Formula/clozure-cl.rb b/Library/Formula/clozure-cl.rb index aa9231847..f954bbe39 100644 --- a/Library/Formula/clozure-cl.rb +++ b/Library/Formula/clozure-cl.rb @@ -15,10 +15,7 @@ class ClozureCl < Formula libexec.install Dir["*"] scripts = Dir["#{libexec}/scripts/ccl{,64}"] - inreplace scripts do |s| - s.gsub! /CCL_DEFAULT_DIRECTORY=.+$/, %Q{CCL_DEFAULT_DIRECTORY="#{libexec}"} - end - + inreplace scripts, /CCL_DEFAULT_DIRECTORY=.+$/, %Q{CCL_DEFAULT_DIRECTORY="#{libexec}"} bin.install_symlink scripts end diff --git a/Library/Formula/fits.rb b/Library/Formula/fits.rb index 70f25c7ea..98ce318fa 100644 --- a/Library/Formula/fits.rb +++ b/Library/Formula/fits.rb @@ -24,10 +24,8 @@ class Fits < Formula # fits-env.sh is a helper script that sets up environment # variables, so we want to tuck this away in libexec libexec.install 'fits-env.sh' - %w[fits.sh fits-ngserver.sh].each do |file| - inreplace file, '"$(dirname $BASH_SOURCE)/fits-env.sh"', - "'#{libexec}/fits-env.sh'" - end + inreplace %w[fits.sh fits-ngserver.sh], + '"$(dirname $BASH_SOURCE)/fits-env.sh"', "'#{libexec}/fits-env.sh'" bin.install 'fits.sh' => 'fits' bin.install 'fits-ngserver.sh' => 'fits-ngserver' diff --git a/Library/Formula/libunwind-headers.rb b/Library/Formula/libunwind-headers.rb index 217f31f11..083c9b2e5 100644 --- a/Library/Formula/libunwind-headers.rb +++ b/Library/Formula/libunwind-headers.rb @@ -22,10 +22,8 @@ class LibunwindHeaders < Formula inreplace "include/libunwind.h", /__OSX_AVAILABLE_STARTING\(__MAC_NA,.*\)/, "__attribute__((unavailable))" - %w[include/libunwind.h include/unwind.h src/AddressSpace.hpp - src/InternalMacros.h].each do |header| - inreplace header, "Availability.h", "AvailabilityMacros.h" - end + inreplace %w[include/libunwind.h include/unwind.h src/AddressSpace.hpp src/InternalMacros.h], + "Availability.h", "AvailabilityMacros.h" end include.install Dir['include/*'] diff --git a/Library/Formula/shrewsoft-vpn-client.rb b/Library/Formula/shrewsoft-vpn-client.rb index c55cd6a52..5235f0c2e 100644 --- a/Library/Formula/shrewsoft-vpn-client.rb +++ b/Library/Formula/shrewsoft-vpn-client.rb @@ -36,12 +36,13 @@ class ShrewsoftVpnClient < Formula # there is no suport for an alternate Applications folder, must change hard-coded paths if build.with? "gui" - %w{ + files = %w{ package/macosx/vpn-client-install.packproj source/qikea/CMakeLists.txt source/qikea/root.cpp source/qikec/CMakeLists.txt - }.each { |path| inreplace path, "/Applications", prefix } + } + inreplace files, "/Applications", prefix end cmake_args = std_cmake_args + [ |
