18 lines
350 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
2017-03-10 09:33:48 +01:00
def link
super
return if source.executable?
if source.writable?
FileUtils.chmod "+x", source
else
2017-04-20 17:21:57 +10:00
@command.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