vendor/gems/BlueCloth-1.0.0/utils.rb
### Read the specified <tt>manifestFile</tt>, which is a text file
### describing which files to package up for a distribution. The manifest
### should consist of one or more lines, each containing one filename or
### shell glob pattern.
Read the specified manifestFile, which is a text file
describing which files to package up for a distribution. The manifest
should consist of one or more lines, each containing one filename or
shell glob pattern.
Read the specified manifestFile which is a text file describing which files to package up for a distribution . The manifest should consist of one or more lines each containing one filename or shell glob pattern .
def readManifest( manifestFile="MANIFEST" )
		message "Reading manifest..."
		raise "Missing #{manifestFile}, please remake it" unless File.exists? manifestFile
		manifest = IO::readlines( manifestFile ).collect {|line|
			line.chomp
		}.select {|line|
			line !~ /^(\s*(#.*)?)?$/
		}
		filelist = []
		for pat in manifest
			$stderr.puts "Adding files that match '#{pat}' to the file list" if $VERBOSE
			filelist |= Dir.glob( pat ).find_all {|f| FileTest.file?(f)}
		end
		message "found #{filelist.length} files.\n"
		return filelist
	end
def readManifest ( manifestFile = "MANIFEST" ) message "Reading manifest..." raise "Missing #{manifestFile}, please remake it" unless File . exists? manifestFile manifest = IO :: readlines ( manifestFile ) . collect { | line | line . chomp } . select { | line | line !~ / ^( \s *(#.*)?)?$ / } filelist = [ ] for pat in manifest $stderr . puts "Adding files that match '#{pat}' to the file list" if $VERBOSE filelist |= Dir . glob ( pat ) . find_all { | f | FileTest . file? ( f ) } end message "found #{filelist.length} files.\n" return filelist end
Read the specified <tt>manifestFile</tt>, which is a text file
describing which files to package up for a distribution.
Read the specified <tt > manifestFile< / tt > which is a text file describing which files to package up for a distribution .
manifestFile
<not_specific>