Help creating symlinks #546
-
I am working on a formula for my own Tap, but I am struggling with creating symlinks for some files. This is my scenario, two files have the From the docs on Taking inspiration from %w[pyenv-install pyenv-uninstall python-build].each do |cmd|
bin.install_symlink "#{prefix}/plugins/python-build/bin/#{cmd}"
end Taking %w[file_1.sh file_2.sh file_3].each do |cmd|
bin.install_symlink ... As expected, Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can use the fat arrow here, so if you wanted bin.install_symlink "#{libexec}/foo.sh" => "foo" |
Beta Was this translation helpful? Give feedback.
-
I see! That created a symlink inside the Thanks, @jonchang! |
Beta Was this translation helpful? Give feedback.
-
For anyone interested, this is my final solution: %w[foo.sh bar.sh baz].each do |cmd|
bin.install_symlink "#{prefix}/#{cmd}" => "#{cmd.gsub(".sh", "")}"
end |
Beta Was this translation helpful? Give feedback.
You can use the fat arrow here, so if you wanted
foo
to point tolibexec/foo.sh
then you could say: