Use full paths to strip, mktemp, cat and ls

This commit is contained in:
Max Howell 2010-01-13 05:36:37 +00:00
parent e97c16f498
commit d8c3b3a80a

View File

@ -350,7 +350,7 @@ def macports_or_fink_installed?
end end
def versions_of(keg_name) def versions_of(keg_name)
`ls #{HOMEBREW_CELLAR}/#{keg_name}`.collect { |version| version.strip }.reverse `/bin/ls #{HOMEBREW_CELLAR}/#{keg_name}`.collect { |version| version.strip }.reverse
end end
@ -446,9 +446,9 @@ private
else else
# strip unlinks the file and recreates it, thus breaking hard links! # strip unlinks the file and recreates it, thus breaking hard links!
# is this expected behaviour? patch does it too… still, this fixes it # is this expected behaviour? patch does it too… still, this fixes it
tmp=`mktemp -t #{path.basename}`.strip tmp = `/usr/bin/mktemp -t #{path.basename}`.chomp
`strip #{args} -o #{tmp} #{path}` `/usr/bin/strip #{args} -o #{tmp} #{path}`
`cat #{tmp} > #{path}` `/bin/cat #{tmp} > #{path}`
File.unlink tmp File.unlink tmp
end end
end end