Mike McQuaid 90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00

18 lines
404 B
Ruby

require "cask/artifact/symlinked"
module Hbc
module Artifact
class Binary < Symlinked
def link(command: nil, **options)
super(command: command, **options)
return if source.executable?
if source.writable?
FileUtils.chmod "+x", source
else
command.run!("/bin/chmod", args: ["+x", source], sudo: true)
end
end
end
end
end