diff --git a/Formula/scalate.rb b/Formula/scalate.rb index 894c9fa879..04e411b83f 100644 --- a/Formula/scalate.rb +++ b/Formula/scalate.rb @@ -1,10 +1,11 @@ require 'formula' +require 'find' class Scalate < Formula - url 'http://repo.fusesource.com/nexus/content/repositories/public/org/fusesource/scalate/scalate-distro/1.4.1/scalate-distro-1.4.1-unix-bin.tar.gz' - version '1.4.1' + url 'http://repo.fusesource.com/nexus/content/repositories/public/org/fusesource/scalate/scalate-distro/1.5.0/scalate-distro-1.5.0-unix-bin.tar.gz' + version '1.5.0' homepage 'http://scalate.fusesource.org/' - md5 'ed58ac43592bdbb15148a5453b254cee' + md5 '7574d29b29c05c086f1fa977f23ed4a5' def startup_script <<-EOS.undent @@ -17,9 +18,17 @@ class Scalate < Formula end def install - rm_f Dir["bin/*.bat"] - prefix.install %w{ LICENSE.txt ReadMe.html } + # Recursively fix the permissions of extracted regular files excluding the bin directory contents. + %w{ archetypes docs lib samples license.txt readme.html }.each do |name| + Find.find(name) do |path| + if File.file?(path) + File.chmod(0644, path) + end + end + end + + prefix.install %w{ license.txt readme.html } libexec.install Dir['*'] (bin+'scalate').write startup_script