Skip to content

Commit

Permalink
freecad@0.21.2_py310: update post_install step
Browse files Browse the repository at this point in the history
  • Loading branch information
ipatch committed Nov 9, 2024
1 parent 076594c commit 1f7ec06
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Formula/freecad@0.21.2_py310.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,22 @@ def install
def post_install
if OS.mac?
ohai "the value of prefix = #{prefix}"
ln_s "#{prefix}/MacOS/FreeCAD", "#{HOMEBREW_PREFIX}/bin/freecad", force: true
ln_s "#{prefix}/MacOS/FreeCADCmd", "#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
freecad_path = Pathname.new("#{prefix}/MacOS/FreeCAD")
freecadcmd_path = Pathname.new("#{prefix}/MacOS/FreeCADCmd")

ln_s freecad_path.relative_path_from(Pathname.new("#{HOMEBREW_PREFIX}/bin")), "#{HOMEBREW_PREFIX}/bin/freecad",
force: true
ln_s freecadcmd_path.relative_path_from(Pathname.new("#{HOMEBREW_PREFIX}/bin")),
"#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
elsif OS.linux?
ohai "the value of prefix = #{prefix}"
ln_s "#{bin}/FreeCAD", "#{HOMEBREW_PREFIX}/bin/freecad", force: true
ln_s "#{bin}/FreeCADCmd", "#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
freecad_path = Pathname.new("#{bin}/FreeCAD")
freecadcmd_path = Pathname.new("#{bin}/FreeCADCmd")

ln_s freecad_path.relative_path_from(Pathname.new("#{HOMEBREW_PREFIX}/bin")), "#{HOMEBREW_PREFIX}/bin/freecad",
force: true
ln_s freecadcmd_path.relative_path_from(Pathname.new("#{HOMEBREW_PREFIX}/bin")),
"#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
end
end

Expand Down

0 comments on commit 1f7ec06

Please sign in to comment.