+x wrapper scripts, so they work during post-install

This commit is contained in:
Adam Vandenberg 2013-12-12 08:21:22 -08:00
parent 5c18054341
commit 7516cee374

View File

@ -377,6 +377,7 @@ class Pathname
targets.flatten!
if targets.empty?
opoo "tried to write exec scripts to #{self} for an empty list of targets"
return
end
targets.each do |target|
target = Pathname.new(target) # allow pathnames or strings
@ -384,6 +385,8 @@ class Pathname
#!/bin/bash
exec "#{target}" "$@"
EOS
# +x here so this will work during post-install as well
(self+target.basename()).chmod 0644
end
end
@ -393,6 +396,8 @@ class Pathname
#!/bin/bash
exec java #{java_opts} -jar #{target_jar} "$@"
EOS
# +x here so this will work during post-install as well
(self+script_name).chmod 0644
end
def install_metafiles from=nil