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>
This commit is contained in:
Jack Nagel 2012-06-17 17:41:41 -05:00
parent ddf1da7b09
commit 899a19eccf
3 changed files with 14 additions and 4 deletions

View file

@ -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"

View file

@ -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

View file

@ -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}