Keep x bit on both libexec/ + bin/

This commit is contained in:
0x1eef 2024-02-07 20:56:05 -03:00
parent f25a6f94f8
commit 8dbc8a12b4

View file

@ -45,9 +45,16 @@ class Copy < Builder
end
sh "find #{dest} -type d -exec chmod u=rwx,g=rx,o=rx {} +"
sh "find #{dest} -type f -exec chmod u=rw,g=r,o=r {} +"
if _1 == "twenty-cli"
sh "find #{dest}/libexec -type f -exec chmod u=rwx,g=rx,o=rx {} +"
end
chmod_exes(dest)
end
end
private
def chmod_exes(dest)
[File.join(dest, "libexec"), File.join(dest, "bin")].each do |exedir|
next unless File.exist?(exedir)
sh "find #{exedir} -type f -exec chmod u=rwx,g=rx,o=rx {} +"
end
end
end