Sha256: 427178a2d3f6a31d87903241f86d5cd3272ed380ff80f7596e3ce03bae8366c7
Contents?: true
Size: 1004 Bytes
Versions: 47
Compression:
Stored size: 1004 Bytes
Contents
# =========================================================================== # Project: Abbot - SproutCore Build Tools # Copyright: ©2009 Apple Inc. # portions copyright @2006-2011 Strobe Inc. # and contributors # =========================================================================== require "sproutcore/buildfile/task" module SC # Just like a normal task, but will not run if the destination path already # exists and it is newer than the source. class Buildfile::BuildTask < ::SC::Buildfile::Task def needed? return true if DST_PATH.nil? || SRC_PATHS.nil? # just try to build... return true if !File.exist?(DST_PATH) ret = false dst_mtime = File.mtime(DST_PATH) SRC_PATHS.each do |path| next if path.nil? # skip incase of bad src paths... timestamp = File.exist?(path) ? File.mtime(path) : EARLY ret = ret || (dst_mtime < timestamp) break if ret end return ret end end end
Version data entries
47 entries across 47 versions & 1 rubygems