diff options
| author | Jack Nagel | 2012-05-15 13:31:21 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2012-05-15 14:03:11 -0500 | 
| commit | 417d7880702a645a5efd272a42dd03a8e7419035 (patch) | |
| tree | 62ec77b19613a1a35f82011c3d931f5409e69384 /Library/Formula/vtk.rb | |
| parent | 5d3217437e0455f143d33061718fbea0c6ee0277 (diff) | |
| download | homebrew-417d7880702a645a5efd272a42dd03a8e7419035.tar.bz2 | |
Shore up a number of shell quoting issues
When interpolating in strings passed to Formula#system, it should be
done in such a way that if any interpolated variables contain spaces,
they are either (a) passed as part of a list or (b) protected by quotes
if they are part of a long string (which is subject to shell expansion).
Otherwise, they will be split on the space when expanded by the shell
and passed as multiple arguments to whatever process is being executed.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/vtk.rb')
| -rw-r--r-- | Library/Formula/vtk.rb | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Formula/vtk.rb b/Library/Formula/vtk.rb index 72fdc3e0f..5147ba7f9 100644 --- a/Library/Formula/vtk.rb +++ b/Library/Formula/vtk.rb @@ -73,7 +73,7 @@ class Vtk < Formula      # to get the right RPATH in the python libraries (the .so files in the vtk egg).      # Also readable: http://vtk.1045678.n5.nabble.com/VTK-Python-Wrappers-on-Red-Hat-td1246159.html      args << "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON" -    ENV['DYLD_LIBRARY_PATH'] = `pwd`.strip + "/build/bin" +    ENV['DYLD_LIBRARY_PATH'] = buildpath/'build/bin'      args << ".." @@ -84,10 +84,10 @@ class Vtk < Formula        #   collect2: ld returned 1 exit status        #   make[2]: *** [bin/vtkpython] Error 1        # We symlink such that the DCMAKE_INSTALL_NAME_DIR is available and points to the current build/bin -      mkpath "#{lib}" # create empty directories, because we need it here -      system "ln -s " + ENV['DYLD_LIBRARY_PATH'] + " '#{lib}/vtk-5.8'" +      lib.mkpath # create empty directories, because we need it here +      ln_s ENV['DYLD_LIBRARY_PATH'], lib/'vtk-5.8'        system "make" -      system "rm '#{lib}/vtk-5.8'" # Remove our symlink, was only needed to make make succeed. +      rm lib/'vtk-5.8' # Remove our symlink, was only needed to make make succeed.        # end work-a-round        system "make install" # Finally move libs in their places.      end  | 
