summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorJade <plusjade@gmail.com>2012-03-01 01:05:11 -0800
committerJade <plusjade@gmail.com>2012-03-01 01:05:11 -0800
commitca37b93198908805edf8efbe2d3e8045933f46f4 (patch)
tree57be67f9e2b7db9cc5bb3efd8a77e8107eb3f3ec /Rakefile
parent535aa3d0af530830f3d420f82a2523e986c7fa36 (diff)
parent4a03980a8c5127d7b839e6e8bdad47b17b5777bc (diff)
Merge pull request #40 from 3martini/windows-topic
Windows MSYS Support
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index 2ff9f92..e1364af 100644
--- a/Rakefile
+++ b/Rakefile
@@ -254,7 +254,7 @@ end # end namespace :theme
# Returns theme manifest hash
def theme_from_git_url(url)
tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
- system("git clone #{url} #{tmp_path}")
+ abort("rake aborted: system call to git clone failed") if !system("git clone #{url} #{tmp_path}")
manifest = verify_manifest(tmp_path)
new_path = JB::Path.build(:theme_packages, :node => manifest["name"])
if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n'
@@ -273,9 +273,11 @@ end
#
# Returns theme manifest hash
def verify_manifest(theme_path)
- manifest = File.join(theme_path, "manifest.yml")
- abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest
- manifest = YAML.load_file(manifest)
+ manifest_path = File.join(theme_path, "manifest.yml")
+ manifest_file = File.open( manifest_path )
+ abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest_file
+ manifest = YAML.load( manifest_file )
+ manifest_file.close
manifest
end