diff options
| author | Jack Nagel | 2012-06-17 17:41:41 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-06-17 17:55:53 -0500 |
| commit | 439e1adbaa42af0cb7153b77a8b18d038d10cee4 (patch) | |
| tree | 1c6bed9fdcc6a70d9099c702f0de91dffd8fa787 /Library | |
| parent | 57449d28243f0b99511053701518823b8ef61361 (diff) | |
| download | homebrew-439e1adbaa42af0cb7153b77a8b18d038d10cee4.tar.bz2 | |
Avoid chdir in subshells
The preferred "chdir for this step only" idiom is to use the block-form
'cd' method.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/macvim.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/qi.rb | 10 | ||||
| -rw-r--r-- | Library/Formula/samtools.rb | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/Library/Formula/macvim.rb b/Library/Formula/macvim.rb index 1d67cb2cd..42ef95951 100644 --- a/Library/Formula/macvim.rb +++ b/Library/Formula/macvim.rb @@ -58,7 +58,9 @@ class Macvim < Formula end # Reference: https://github.com/b4winckler/macvim/wiki/building - system "cd src/MacVim/icons && make getenvy" + cd 'src/MacVim/icons' do + system "make getenvy" + end system "make" diff --git a/Library/Formula/qi.rb b/Library/Formula/qi.rb index 0a92a94c5..c0f174878 100644 --- a/Library/Formula/qi.rb +++ b/Library/Formula/qi.rb @@ -17,11 +17,17 @@ class Qi < Formula def install if ARGV.include? '--SBCL' - system "cd Lisp; sbcl --load 'install.lsp'" + cd 'Lisp' do + system "sbcl", "--load", "install.lsp" + end + system "echo \"#!/bin/bash\nsbcl --core #{prefix}/Qi.core $*\" > qi" prefix.install ['Lisp/Qi.core'] else - system "cd Lisp; clisp install.lsp" + cd 'Lisp' do + system "clisp", "install.lsp" + end + system "echo \"#!/bin/bash\nclisp -M #{prefix}/Qi.mem $*\" > qi" prefix.install ['Lisp/Qi.mem'] end diff --git a/Library/Formula/samtools.rb b/Library/Formula/samtools.rb index 98f41f0c5..a5231117d 100644 --- a/Library/Formula/samtools.rb +++ b/Library/Formula/samtools.rb @@ -9,7 +9,9 @@ class Samtools < Formula def install system "make" system "make razip" - system "cd bcftools; make" + cd 'bcftools' do + system "make" + end bin.install %w{samtools razip bcftools/bcftools bcftools/vcfutils.pl} bin.install %w{misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/seqtk misc/wgsim} |
