22 lines
420 B
Ruby
Raw Normal View History

2016-08-18 22:11:42 +03:00
require "hbc/artifact/symlinked"
2016-09-24 13:52:43 +02:00
module Hbc
module Artifact
class Binary < Symlinked
def install_phase
2017-03-06 20:37:13 +01:00
super if CLI.binaries?
2016-09-24 13:52:43 +02:00
end
2017-03-08 16:35:02 +01:00
2017-03-10 09:33:48 +01:00
def link
super
return if source.executable?
if source.writable?
FileUtils.chmod "+x", source
else
@command.run!.run("/bin/chmod", args: ["+x", source], sudo: true)
end
2017-03-08 16:35:02 +01:00
end
2016-09-24 13:52:43 +02:00
end
2016-08-18 22:11:42 +03:00
end
end