def set_mode
      chmod = command? 'chmod'
      find = command? 'find'

      return unless chmod && find

      {fmode: 'f', dmode: 'd'}.each do |k, v|
        next if send(k).nil?
        cmd = [find, destination_path, '-type', v, '-exec']
        cmd.concat [chmod, send(k).to_s(8), '{}', '+']
        logger.debug { "Running command: #{cmd.join ' '}" }
        system(*cmd)
      end
    end
def set_mode
      chmod = command? 'chmod'
      find = command? 'find'

      return unless chmod && find

      {fmode: 'f', dmode: 'd'}.each do |k, v|
        next if send(k).nil?
        cmd = [find, destination_path, '-type', v, '-exec']
        cmd.concat [chmod, send(k).to_s(8), '{}', '+']
        logger.debug { "Running command: #{cmd.join ' '}" }
        system(*cmd)
      end
    end
Recursively sets file mode.
 @todo Make this more platform independent.