Skip to content

Commit

Permalink
scalate 1.5.0
Browse files Browse the repository at this point in the history
Fix the UNIX archive file permissions after extracting the files.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
jonbuffington authored and adamv committed Jun 13, 2011
1 parent 36b7066 commit feb0e1e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Library/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
Expand All @@ -17,9 +18,17 @@ def startup_script
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
Expand Down

0 comments on commit feb0e1e

Please sign in to comment.