Permalink
Browse files

Merge pull request #80 from pcarrier/master

Commit titles say it all :)
  • Loading branch information...
2 parents 2dd0dda + 763ba67 commit 66624eb8122793d785b2fe928c806734abc77e97 @jordansissel committed Jul 26, 2011
Showing with 13 additions and 3 deletions.
  1. +7 −2 lib/fpm/builder.rb
  2. +6 −1 lib/fpm/source/pyfpm/get_metadata.py
View
@@ -202,8 +202,13 @@ def generate_md5sums
private
def checksum(paths)
paths.collect do |path|
- next if !File.exists?(path)
- %x{find #{path} -type f -printf %P\\\\0 | xargs -0 md5sum}.split("\n")
+ if File.directory? path
+ %x{find #{path} -type f -printf %P\\\\0 | xargs -0 md5sum}.split("\n")
+ elsif File.exists? path
+ %x{md5sum #{path}}
+ else
+ next
+ end
end.flatten
end # def checksum
end
@@ -83,6 +83,11 @@ def run(self):
data["dependencies"] = final_deps
#print json.dumps(data, indent=2)
- print json.dumps(data, indent=2)
+ try:
+ print json.dumps(data, indent=2)
+ except AttributeError, e:
+ # For Python 2.5 and Debian's python-json
+ print json.write(data)
+
# def run
# class list_dependencies

0 comments on commit 66624eb

Please sign in to comment.