Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions dcp_inspect
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ class Options
options.audio_analysis = true
options.validate = true
options.as_asset_store = false
options.follow_symlinks = false
options.verbosity = [ 'debug', 'dev' ]
options.logfile = nil
options.logfile_append = nil
Expand Down Expand Up @@ -238,6 +239,9 @@ BANNER
opts.on( '-s', '--as-asset-store', 'Simulate asset store by merging all collected AM dictionaries' ) do
options.as_asset_store = true
end
opts.on( '--symlinks', 'Follow symlinks when searching for files' ) do
options.follow_symlinks = true
end
opts.on( '-l', '--logfile path', String, 'Write full report to logfile at path' ) do |p|
options.logfile = p
end
Expand Down Expand Up @@ -4069,10 +4073,10 @@ def cpl_inspect_xml( xml, dict, audio_stats, package_dir, errors, hints, info, o
return report, errors, hints, info
end # cpl_inspect_xml

def dir_tree( arg )
def dir_tree( arg, follow_symlinks )
package_dir_tree = Array.new
begin
Dir.chdir( arg ) { |d| package_dir_tree = Dir[ "**/*" ] }
Dir.chdir( arg ) { |d| package_dir_tree = Dir[ follow_symlinks ? "**{,/*/**}/*" : "**/*" ] }
#
# Alternatively consider
#
Expand Down Expand Up @@ -4116,7 +4120,7 @@ def dcp_inspect( options, arg )
# collect all files dangling below arg
#
@package_dir = arg
package_dir_tree = dir_tree( @package_dir )
package_dir_tree = dir_tree( @package_dir, options.follow_symlinks )

#
# Find files called what Assetmap(s) would be called.
Expand Down