From 0ddc2f68c6b623c84a911e5066cf20e13e30be49 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 17 Apr 2014 10:15:52 -0500 Subject: openvpn: remove unnecessary loop --- Library/Formula/appscale-tools.rb | 6 ++---- Library/Formula/openvpn.rb | 9 +++------ 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'Library') diff --git a/Library/Formula/appscale-tools.rb b/Library/Formula/appscale-tools.rb index 46bbeaab0..ffb883473 100644 --- a/Library/Formula/appscale-tools.rb +++ b/Library/Formula/appscale-tools.rb @@ -67,10 +67,8 @@ class AppscaleTools < Formula resource('httplib2').stage { system "python", *install_args } resource('python-gflags').stage { system "python", *install_args } - Dir['bin/appscale*'].each do |command_file| - inreplace command_file do |s| - s.gsub! /^lib = os.*/, "lib = '#{libexec}'" - end + inreplace Dir["bin/appscale*"] do |s| + s.gsub! /^lib = os.*/, "lib = '#{libexec}'" end prefix.install 'bin', 'templates', 'LICENSE', 'README.md' diff --git a/Library/Formula/openvpn.rb b/Library/Formula/openvpn.rb index c6cff0c82..f350f364c 100644 --- a/Library/Formula/openvpn.rb +++ b/Library/Formula/openvpn.rb @@ -27,14 +27,11 @@ class Openvpn < Formula system "make install" # Adjust sample file paths - inreplace ["sample/sample-config-files/openvpn-startup.sh"] do |s| - s.gsub! "/etc/openvpn", etc+'openvpn' - end + inreplace "sample/sample-config-files/openvpn-startup.sh", + "/etc/openvpn", "#{etc}/openvpn" # Install sample files - Dir['sample/sample-*'].each do |d| - (share + 'doc/openvpn' + d).install Dir[d+'/*'] - end + (doc/"sample").install Dir["sample/sample-*"] # Create etc & var paths (etc + 'openvpn').mkpath -- cgit v1.2.3