lib/jss-api/composer.rb in jss-api-0.5.8 vs lib/jss-api/composer.rb in jss-api-0.6.1

- old
+ new

@@ -1,6 +1,6 @@ -### Copyright 2014 Pixar +### Copyright 2016 Pixar ### ### Licensed under the Apache License, Version 2.0 (the "Apache License") ### with the following modification; you may not use this file except in ### compliance with the Apache License and the following modification to it: ### Section 6. Trademarks. is deleted and replaced with: @@ -84,10 +84,10 @@ raise NoSuchItemError, "Missing pkgbuild tool. Please make sure you're running 10.8 or later." unless PKGBUILD.executable? opts[:out_dir] ||= DEFAULT_OUT_DIR opts[:bundle_id_prefix] ||= PKG_BUNDLE_ID_PFX - pkg_filename = "#{name}.pkg" + pkg_filename = name.end_with?(".pkg") ? name : name+".pkg" pkg_id = opts[:bundle_id_prefix] + "." + name pkg_out = "#{opts[:out_dir]}/#{pkg_filename}" pkg_ownership = opts[:preserve_ownership] ? "preserve" : "recommended"