lib/upgrade.rb in dev_tasks-0.0.48 vs lib/upgrade.rb in dev_tasks-0.0.49
- old
+ new
@@ -15,11 +15,20 @@
end
}
if(defined?(DEV_TASKS))
if(DEV_TASKS[:dependencies].has_key?(:source))
DEV_TASKS[:dependencies][:source].each{|source_dep|
+
+ wrk=source_dep.gsub("/dep/","/wrk")
+ self.add "<%rake('#{wrk}')%>" if(Dir.exists?(wrk))
+
dest = "./dep/#{File.basename(source_dep)}"
- self.add "<%Environment.copy_if_newer('#{source_dep}','#{dest}')%>"
+
+ if(!File.exists?(dest))
+ self.add "<%FileUtils.cp('#{source_dep}','#{dest}')%>"
+ else
+ self.add "<%FileUtils.cp('#{source_dep}','#{dest}')%>" if(File.mtime(source) > File.mtime(dest))
+ end
}
end
end
end
end
\ No newline at end of file