Merge pull request #4470 from apjanke/chmods-for-exec-scripts
Explicitly chmod exec script files
This commit is contained in:
commit
87ba4c52ec
@ -328,10 +328,12 @@ class Pathname
|
|||||||
mkpath
|
mkpath
|
||||||
targets.each do |target|
|
targets.each do |target|
|
||||||
target = Pathname.new(target) # allow pathnames or strings
|
target = Pathname.new(target) # allow pathnames or strings
|
||||||
join(target.basename).write <<~SH
|
script = join(target.basename)
|
||||||
|
script.write <<~SH
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
exec "#{target}" "$@"
|
exec "#{target}" "$@"
|
||||||
SH
|
SH
|
||||||
|
script.chmod 0555
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -344,6 +346,7 @@ class Pathname
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#{env_export}exec "#{target}" "$@"
|
#{env_export}exec "#{target}" "$@"
|
||||||
SH
|
SH
|
||||||
|
chmod 0555
|
||||||
end
|
end
|
||||||
|
|
||||||
# Writes a wrapper env script and moves all files to the dst
|
# Writes a wrapper env script and moves all files to the dst
|
||||||
@ -367,6 +370,7 @@ class Pathname
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#{java_home}exec java #{java_opts} -jar #{target_jar} "$@"
|
#{java_home}exec java #{java_opts} -jar #{target_jar} "$@"
|
||||||
SH
|
SH
|
||||||
|
chmod 0555
|
||||||
end
|
end
|
||||||
|
|
||||||
def install_metafiles(from = Pathname.pwd)
|
def install_metafiles(from = Pathname.pwd)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user