#!/usr/bin/env python3
#
# This Python script synchronizes multiple copies of the same file in the repository.
#
# Use as:
#   python ./github/scripts/synchronize-private.py

import os
import sys

sync_lists = [
  [
    'fileio/private/add_mex_source.m',
    'forward/private/add_mex_source.m'
  ],
  [
    'external/dipoli/ama2headmodel.m',
    'fileio/private/ama2headmodel.m',
    'forward/private/ama2headmodel.m'
  ],
  [
    'utilities/appendstruct.m',
    'fileio/private/appendstruct.m'
  ],
  [
    'private/artifact2boolvec.m',
    'external/dss/private/artifact2boolvec.m'
  ],
  [
    'private/artifact2trl.m',
    'external/dss/private/artifact2trl.m'
  ],
  [
    'contrib/nutmegtrip/private/atlas_lookup.m',
    'private/atlas_lookup.m',
    'plotting/private/atlas_lookup.m'
  ],
  [
    'inverse/private/avgref.m',
    'private/avgref.m'
  ],
  [
    'plotting/private/bg_rgba2rgb.m',
    'private/bg_rgba2rgb.m'
  ],
  [
    'fileio/private/bids_sidecar.m',
    'trialfun/private/bids_sidecar.m'
  ],
  [
    'private/boolvec2artifact.m',
    'external/dss/private/boolvec2artifact.m'
  ],
  [
    'fileio/private/buffer.mexa64',
    'realtime/src/buffer/matlab/buffer.mexa64'
  ],
  [
    'fileio/private/buffer.mexglx',
    'realtime/src/buffer/matlab/buffer.mexglx'
  ],
  [
    'fileio/private/buffer.mexmac',
    'realtime/src/buffer/matlab/buffer.mexmac'
  ],
  [
    'fileio/private/buffer.mexmaca64',
    'realtime/src/buffer/matlab/buffer.mexmaca64'
  ],
  [
    'fileio/private/buffer.mexmaci',
    'realtime/src/buffer/matlab/buffer.mexmaci'
  ],
  [
    'fileio/private/buffer.mexmaci64',
    'realtime/src/buffer/matlab/buffer.mexmaci64'
  ],
  [
    'fileio/private/buffer.mexw32',
    'realtime/src/buffer/matlab/buffer.mexw32'
  ],
  [
    'fileio/private/buffer.mexw64',
    'realtime/src/buffer/matlab/buffer.mexw64'
  ],
  [
    'private/channelconnectivity.m',
    'test/private/channelconnectivity.m'
  ],
  [
    'fileio/private/channelposition.m',
    'forward/private/channelposition.m',
    'plotting/private/channelposition.m',
    'private/channelposition.m',
    'utilities/private/channelposition.m'
  ],
  [
    'plotting/private/colorspec2rgb.m',
    'private/colorspec2rgb.m'
  ],
  [
    'private/combineClusters.m',
    'plotting/private/combineClusters.m'
  ],
  [
    'private/combineClusters.mexa64',
    'plotting/private/combineClusters.mexa64',
    'src/combineClusters.mexa64'
  ],
  [
    'private/combineClusters.mexw32',
    'plotting/private/combineClusters.mexw32',
    'src/combineClusters.mexw32'
  ],
  [
    'private/combineClusters.mexw64',
    'plotting/private/combineClusters.mexw64',
    'src/combineClusters.mexw64'
  ],
  [
    'private/combineClusters2.m',
    'plotting/private/combineClusters2.m'
  ],
  [
    'fileio/private/compile_mex_list.m',
    'forward/private/compile_mex_list.m'
  ],
  [
    'src/compiler.h'
  ],
  [
    'matlablt2016b/contains.m',
    'octave/contains.m'
  ],
  [
    'utilities/private/coordsys2label.m',
    'plotting/private/coordsys2label.m',
    'private/coordsys2label.m'
  ],
  [
    'fileio/private/cornerpoints.m',
    'forward/private/cornerpoints.m',
    'plotting/private/cornerpoints.m',
    'private/cornerpoints.m',
    'utilities/private/cornerpoints.m'
  ],
  [
    'private/csp.m',
    'test/private/csp.m'
  ],
  [
    'fileio/private/ctf2grad.m',
    'private/ctf2grad.m'
  ],
  [
    'fileio/private/dataset2files.m',
    'utilities/private/dataset2files.m'
  ],
  [
    'connectivity/private/defaultId.m',
    'fileio/private/defaultId.m',
    'forward/private/defaultId.m',
    'inverse/private/defaultId.m',
    'plotting/private/defaultId.m',
    'preproc/private/defaultId.m',
    'private/defaultId.m',
    'specest/private/defaultId.m',
    'statfun/private/defaultId.m',
    'test/private/defaultId.m',
    'trialfun/private/defaultId.m',
    'utilities/private/defaultId.m'
  ],
  [
    'connectivity/private/det2x2.m',
    'private/det2x2.m',
    'src/det2x2.m'
  ],
  [
    'connectivity/private/det2x2.mexa64',
    'private/det2x2.mexa64',
    'src/det2x2.mexa64'
  ],
  [
    'connectivity/private/det2x2.mexglx',
    'private/det2x2.mexglx',
    'src/det2x2.mexglx'
  ],
  [
    'connectivity/private/det2x2.mexmaci',
    'private/det2x2.mexmaci',
    'src/det2x2.mexmaci'
  ],
  [
    'connectivity/private/det2x2.mexmaci64',
    'private/det2x2.mexmaci64',
    'src/det2x2.mexmaci64'
  ],
  [
    'connectivity/private/det2x2.mexw32',
    'private/det2x2.mexw32',
    'src/det2x2.mexw32'
  ],
  [
    'connectivity/private/det2x2.mexw64',
    'private/det2x2.mexw64',
    'src/det2x2.mexw64'
  ],
  [
    'connectivity/private/det3x3.m',
    'private/det3x3.m',
    'src/det3x3.m'
  ],
  [
    'connectivity/private/det3x3.mexa64',
    'private/det3x3.mexa64',
    'src/det3x3.mexa64'
  ],
  [
    'connectivity/private/det3x3.mexglx',
    'private/det3x3.mexglx',
    'src/det3x3.mexglx'
  ],
  [
    'connectivity/private/det3x3.mexmaca64',
    'private/det3x3.mexmaca64',
    'src/det3x3.mexmaca64'
  ],
  [
    'connectivity/private/det3x3.mexmaci',
    'private/det3x3.mexmaci',
    'src/det3x3.mexmaci'
  ],
  [
    'connectivity/private/det3x3.mexmaci64',
    'private/det3x3.mexmaci64',
    'src/det3x3.mexmaci64'
  ],
  [
    'connectivity/private/det3x3.mexw32',
    'private/det3x3.mexw32',
    'src/det3x3.mexw32'
  ],
  [
    'connectivity/private/det3x3.mexw64',
    'private/det3x3.mexw64',
    'src/det3x3.mexw64'
  ],
  [
    'private/determine_segmentationstyle.m',
    'utilities/private/determine_segmentationstyle.m'
  ],
  [
    'private/dimindex.m',
    'utilities/private/dimindex.m'
  ],
  [
    'fileio/private/dimlength.m',
    'private/dimlength.m',
    'utilities/private/dimlength.m'
  ],
  [
    'fileio/private/elproj.m',
    'forward/private/elproj.m',
    'plotting/private/elproj.m',
    'test/private/elproj.m',
    'private/elproj.m'
  ],
  [
    'fileio/private/encode_nifti1.m',
    'realtime/example/private/encode_nifti1.m',
    'realtime/online_mri/private/encode_nifti1.m'
  ],
  [
    'matlablt2016b/endsWith.m',
    'octave/endsWith.m'
  ],
  [
    'qsub/private/fexec.m'
  ],
  [
    'preproc/private/filter_with_correction.m',
    'specest/private/filter_with_correction.m'
  ],
  [
    'external/dipoli/private/find_innermost_boundary.m',
    'external/openmeeg/private/find_innermost_boundary.m',
    'forward/private/find_innermost_boundary.m',
    'inverse/private/find_innermost_boundary.m',
    'private/find_innermost_boundary.m'
  ],
  [
    'forward/private/find_mesh_edge.m',
    'plotting/private/find_mesh_edge.m',
    'private/find_mesh_edge.m'
  ],
  [
    'external/dipoli/private/find_outermost_boundary.m',
    'external/openmeeg/private/find_outermost_boundary.m',
    'fileio/private/find_outermost_boundary.m',
    'forward/private/find_outermost_boundary.m',
    'private/find_outermost_boundary.m'
  ],
  [
    'forward/private/find_triangle_neighbours.m',
    'plotting/private/find_triangle_neighbours.m',
    'private/find_triangle_neighbours.m'
  ],
  [
    'private/findcluster.m',
    'plotting/private/findcluster.m'
  ],
  [
    'preproc/private/fir_df.m',
    'specest/private/fir_df.m'
  ],
  [
    'preproc/private/fir_filterdcpadded.m',
    'specest/private/fir_filterdcpadded.m'
  ],
  [
    'preproc/private/firws.m',
    'specest/private/firws.m'
  ],
  [
    'preproc/private/firwsord.m',
    'specest/private/firwsord.m'
  ],
  [
    'forward/private/fitsphere.m',
    'plotting/private/fitsphere.m',
    'private/fitsphere.m'
  ],
  [
    'private/fixbalance.m',
    'fileio/private/fixbalance.m',
    'forward/private/fixbalance.m',
    'plotting/private/fixbalance.m',
    'test/private/fixbalance.m',
    'utilities/private/fixbalance.m'
  ],
  [
    'fileio/private/fixcoordsys.m',
    'forward/private/fixcoordsys.m',
    'plotting/private/fixcoordsys.m',
    'utilities/private/fixcoordsys.m'
  ],
  [
    'fileio/private/fixdimord.m',
    'private/fixdimord.m',
    'utilities/private/fixdimord.m'
  ],
  [
    'inverse/private/fixdipole.m',
    'private/fixdipole.m',
    'utilities/private/fixdipole.m'
  ],
  [
    'inverse/private/fixinside.m',
    'fileio/private/fixinside.m',
    'private/fixinside.m',
    'utilities/private/fixinside.m'
  ],
  [
    'connectivity/private/fixname.m',
    'fileio/private/fixname.m',
    'forward/private/fixname.m',
    'inverse/private/fixname.m',
    'plotting/private/fixname.m',
    'preproc/private/fixname.m',
    'private/fixname.m',
    'qsub/private/fixname.m',
    'specest/private/fixname.m',
    'statfun/private/fixname.m',
    'test/private/fixname.m',
    'utilities/private/fixname.m',
    'compat/matlablt2014b/private/fixname.m'
  ],
  [
    'fileio/private/fixoldorg.m',
    'forward/private/fixoldorg.m',
    'plotting/private/fixoldorg.m',
    'utilities/private/fixoldorg.m'
  ],
  [
    'fileio/private/fixpos.m',
    'forward/private/fixpos.m',
    'plotting/private/fixpos.m',
    'private/fixpos.m',
    'utilities/private/fixpos.m'
  ],
  [
    'fileio/private/fixsampleinfo.m',
    'private/fixsampleinfo.m',
    'utilities/private/fixsampleinfo.m'
  ],
  [
    'private/fopen_or_error.m',
    'fileio/private/fopen_or_error.m'
  ],
  [
    'fileio/private/ft_apply_montage.m',
    'forward/private/ft_apply_montage.m',
    'plotting/private/ft_apply_montage.m',
    'utilities/ft_apply_montage.m'
  ],
  [
    'fileio/private/ft_checkdata.m',
    'utilities/ft_checkdata.m'
  ],
  [
    'qsub/private/ft_checkopt.m',
    'utilities/ft_checkopt.m'
  ],
  [
    'fileio/private/ft_convert_units.m',
    'forward/ft_convert_units.m',
    'plotting/private/ft_convert_units.m'
  ],
  [
    'fileio/private/ft_datatype.m',
    'utilities/ft_datatype.m'
  ],
  [
    'fileio/private/ft_datatype_comp.m',
    'utilities/ft_datatype_comp.m'
  ],
  [
    'fileio/private/ft_datatype_dip.m',
    'utilities/ft_datatype_dip.m'
  ],
  [
    'fileio/private/ft_datatype_freq.m',
    'utilities/ft_datatype_freq.m'
  ],
  [
    'fileio/private/ft_datatype_headmodel.m',
    'forward/private/ft_datatype_headmodel.m',
    'utilities/ft_datatype_headmodel.m'
  ],
  [
    'fileio/private/ft_datatype_mvar.m',
    'utilities/ft_datatype_mvar.m'
  ],
  [
    'fileio/private/ft_datatype_raw.m',
    'utilities/ft_datatype_raw.m'
  ],
  [
    'fileio/private/ft_datatype_sens.m',
    'forward/private/ft_datatype_sens.m',
    'plotting/private/ft_datatype_sens.m',
    'utilities/ft_datatype_sens.m'
  ],
  [
    'fileio/private/ft_datatype_source.m',
    'utilities/ft_datatype_source.m'
  ],
  [
    'fileio/private/ft_datatype_spike.m',
    'utilities/ft_datatype_spike.m'
  ],
  [
    'fileio/private/ft_datatype_timelock.m',
    'utilities/ft_datatype_timelock.m'
  ],
  [
    'plotting/private/ft_datatype_volume.m',
    'utilities/ft_datatype_volume.m'
  ],
  [
    'connectivity/private/ft_debug.m',
    'fileio/private/ft_debug.m',
    'forward/private/ft_debug.m',
    'inverse/private/ft_debug.m',
    'plotting/private/ft_debug.m',
    'preproc/private/ft_debug.m',
    'specest/private/ft_debug.m',
    'utilities/ft_debug.m'
  ],
  [
    'fileio/private/ft_determine_units.m',
    'forward/ft_determine_units.m',
    'plotting/private/ft_determine_units.m'
  ],
  [
    'connectivity/private/ft_error.m',
    'fileio/private/ft_error.m',
    'forward/private/ft_error.m',
    'inverse/private/ft_error.m',
    'plotting/private/ft_error.m',
    'preproc/private/ft_error.m',
    'specest/private/ft_error.m',
    'utilities/ft_error.m'
  ],
  [
    'fileio/private/ft_estimate_units.m',
    'forward/ft_estimate_units.m',
    'plotting/private/ft_estimate_units.m'
  ],
  [
    'fileio/private/ft_fetch_data.m',
    'test/private/ft_fetch_data.m',
    'utilities/ft_fetch_data.m'
  ],
  [
    'fileio/private/ft_fetch_header.m',
    'utilities/ft_fetch_header.m'
  ],
  [
    'private/ft_fetch_sens.m',
    'test/private/ft_fetch_sens.m',
    'external/artinis/private/ft_fetch_sens.m'
  ],
  [
    'fileio/private/ft_findcfg.m',
    'utilities/ft_findcfg.m',
    'utilities/private/ft_findcfg.m'
  ],
  [
    'src/ft_getopt.c'
  ],
  [
    'connectivity/private/ft_getopt.m',
    'fileio/private/ft_getopt.m',
    'forward/private/ft_getopt.m',
    'inverse/private/ft_getopt.m',
    'plotting/private/ft_getopt.m',
    'qsub/private/ft_getopt.m',
    'specest/private/ft_getopt.m',
    'utilities/ft_getopt.m'
  ],
  [
    'connectivity/private/ft_getopt.mexa64',
    'fileio/private/ft_getopt.mexa64',
    'forward/private/ft_getopt.mexa64',
    'inverse/private/ft_getopt.mexa64',
    'plotting/private/ft_getopt.mexa64',
    'qsub/private/ft_getopt.mexa64',
    'specest/private/ft_getopt.mexa64',
    'src/ft_getopt.mexa64',
    'utilities/ft_getopt.mexa64'
  ],
  [
    'connectivity/private/ft_getopt.mexglx',
    'fileio/private/ft_getopt.mexglx',
    'forward/private/ft_getopt.mexglx',
    'inverse/private/ft_getopt.mexglx',
    'plotting/private/ft_getopt.mexglx',
    'qsub/private/ft_getopt.mexglx',
    'specest/private/ft_getopt.mexglx',
    'src/ft_getopt.mexglx',
    'utilities/ft_getopt.mexglx'
  ],
  [
    'connectivity/private/ft_getopt.mexmaci',
    'fileio/private/ft_getopt.mexmaci',
    'forward/private/ft_getopt.mexmaci',
    'inverse/private/ft_getopt.mexmaci',
    'plotting/private/ft_getopt.mexmaci',
    'qsub/private/ft_getopt.mexmaci',
    'specest/private/ft_getopt.mexmaci',
    'src/ft_getopt.mexmaci',
    'utilities/ft_getopt.mexmaci'
  ],
  [
    'connectivity/private/ft_getopt.mexmaci64',
    'fileio/private/ft_getopt.mexmaci64',
    'forward/private/ft_getopt.mexmaci64',
    'inverse/private/ft_getopt.mexmaci64',
    'plotting/private/ft_getopt.mexmaci64',
    'qsub/private/ft_getopt.mexmaci64',
    'specest/private/ft_getopt.mexmaci64',
    'src/ft_getopt.mexmaci64',
    'utilities/ft_getopt.mexmaci64'
  ],
  [
    'connectivity/private/ft_getopt.mexw32',
    'fileio/private/ft_getopt.mexw32',
    'forward/private/ft_getopt.mexw32',
    'inverse/private/ft_getopt.mexw32',
    'plotting/private/ft_getopt.mexw32',
    'qsub/private/ft_getopt.mexw32',
    'specest/private/ft_getopt.mexw32',
    'src/ft_getopt.mexw32',
    'utilities/ft_getopt.mexw32'
  ],
  [
    'connectivity/private/ft_getopt.mexw64',
    'fileio/private/ft_getopt.mexw64',
    'forward/private/ft_getopt.mexw64',
    'inverse/private/ft_getopt.mexw64',
    'plotting/private/ft_getopt.mexw64',
    'qsub/private/ft_getopt.mexw64',
    'specest/private/ft_getopt.mexw64',
    'src/ft_getopt.mexw64',
    'utilities/ft_getopt.mexw64'
  ],
  [
    'fileio/private/ft_hastoolbox.m',
    'forward/private/ft_hastoolbox.m',
    'inverse/private/ft_hastoolbox.m',
    'plotting/private/ft_hastoolbox.m',
    'utilities/ft_hastoolbox.m'
  ],
  [
    'fileio/private/ft_headcoordinates.m',
    'forward/private/ft_headcoordinates.m',
    'utilities/ft_headcoordinates.m'
  ],
  [
    'fileio/private/ft_headmodeltype.m',
    'forward/ft_headmodeltype.m',
    'inverse/private/ft_headmodeltype.m',
    'plotting/private/ft_headmodeltype.m'
  ],
  [
    'connectivity/private/ft_info.m',
    'fileio/private/ft_info.m',
    'forward/private/ft_info.m',
    'inverse/private/ft_info.m',
    'plotting/private/ft_info.m',
    'preproc/private/ft_info.m',
    'specest/private/ft_info.m',
    'utilities/ft_info.m'
  ],
  [
    'forward/ft_inside_headmodel.m',
    'inverse/private/ft_inside_headmodel.m'
  ],
  [
    'private/ft_inv.m',
    'inverse/private/ft_inv.m'
  ],
  [
    'connectivity/private/ft_notice.m',
    'fileio/private/ft_notice.m',
    'forward/private/ft_notice.m',
    'inverse/private/ft_notice.m',
    'plotting/private/ft_notice.m',
    'preproc/private/ft_notice.m',
    'specest/private/ft_notice.m',
    'utilities/ft_notice.m'
  ],
  [
    'connectivity/private/ft_notification.m',
    'fileio/private/ft_notification.m',
    'forward/private/ft_notification.m',
    'inverse/private/ft_notification.m',
    'plotting/private/ft_notification.m',
    'preproc/private/ft_notification.m',
    'specest/private/ft_notification.m',
    'utilities/private/ft_notification.m'
  ],
  [
    'utilities/ft_platform_supports.m',
    'connectivity/private/ft_platform_supports.m',
    'fileio/private/ft_platform_supports.m',
    'forward/private/ft_platform_supports.m',
    'inverse/private/ft_platform_supports.m',
    'plotting/private/ft_platform_supports.m',
    'preproc/private/ft_platform_supports.m',
    'qsub/private/ft_platform_supports.m',
    'specest/private/ft_platform_supports.m'
  ],
  [
    'preproc/ft_preproc_bandpassfilter.m',
    'specest/private/ft_preproc_bandpassfilter.m'
  ],
  [
    'preproc/ft_preproc_polyremoval.m',
    'specest/private/ft_preproc_polyremoval.m'
  ],
  [
    'connectivity/private/ft_progress.m',
    'fileio/private/ft_progress.m',
    'inverse/private/ft_progress.m',
    'plotting/private/ft_progress.m',
    'utilities/ft_progress.m'
  ],
  [
    'fileio/private/ft_scalingfactor.m',
    'forward/private/ft_scalingfactor.m',
    'inverse/private/ft_scalingfactor.m',
    'plotting/private/ft_scalingfactor.m',
    'utilities/ft_scalingfactor.m'
  ],
  [
    'fileio/private/ft_senslabel.m',
    'forward/ft_senslabel.m',
    'inverse/private/ft_senslabel.m',
    'plotting/private/ft_senslabel.m'
  ],
  [
    'fileio/private/ft_senstype.m',
    'forward/ft_senstype.m',
    'inverse/private/ft_senstype.m',
    'plotting/private/ft_senstype.m'
  ],
  [
    'fileio/private/ft_setopt.m',
    'inverse/private/ft_setopt.m',
    'qsub/private/ft_setopt.m',
    'utilities/ft_setopt.m'
  ],
  [
    'fileio/private/ft_struct2char.m',
    'utilities/ft_struct2char.m'
  ],
  [
    'connectivity/private/ft_version.m',
    'fileio/private/ft_version.m',
    'forward/private/ft_version.m',
    'inverse/private/ft_version.m',
    'plotting/private/ft_version.m',
    'preproc/private/ft_version.m',
    'specest/private/ft_version.m',
    'utilities/ft_version.m'
  ],
  [
    'connectivity/private/ft_warning.m',
    'fileio/private/ft_warning.m',
    'forward/private/ft_warning.m',
    'inverse/private/ft_warning.m',
    'plotting/private/ft_warning.m',
    'preproc/private/ft_warning.m',
    'specest/private/ft_warning.m',
    'utilities/ft_warning.m'
  ],
  [
    'fileio/private/ft_warp_apply.m',
    'forward/private/ft_warp_apply.m',
    'plotting/private/ft_warp_apply.m',
    'utilities/ft_warp_apply.m'
  ],
  [
    'qsub/private/getcustompath.m'
  ],
  [
    'qsub/private/getcustompwd.m'
  ],
  [
    'fileio/private/getdatfield.m',
    'private/getdatfield.m',
    'test/private/getdatfield.m',
    'utilities/private/getdatfield.m',
    'plotting/private/getdatfield.m'
  ],
  [
    'fileio/private/getdimord.m',
    'forward/private/getdimord.m',
    'private/getdimord.m',
    'test/private/getdimord.m',
    'utilities/private/getdimord.m',
    'contrib/spike/private/getdimord.m'
  ],
  [
    'contrib/nutmegtrip/private/getdimsiz.m',
    'fileio/private/getdimsiz.m',
    'forward/private/getdimsiz.m',
    'private/getdimsiz.m',
    'test/private/getdimsiz.m',
    'utilities/private/getdimsiz.m',
    'contrib/spike/private/getdimsiz.m'
  ],
  [
    'qsub/private/getglobal.m'
  ],
  [
    'qsub/private/gethostname.m',
    'test/private/gethostname.m',
    'utilities/private/gethostname.m'
  ],
  [
    'private/getorthoviewpos.m',
    'fileio/private/getorthoviewpos.m'
  ],
  [
    'qsub/private/getpid.m',
    'src/getpid.m'
  ],
  [
    'qsub/private/getpid.mexa64',
    'src/getpid.mexa64'
  ],
  [
    'qsub/private/getpid.mexmaci',
    'src/getpid.mexmaci'
  ],
  [
    'qsub/private/getpid.mexmaci64',
    'src/getpid.mexmaci64'
  ],
  [
    'connectivity/private/getsubfield.m',
    'fileio/private/getsubfield.m',
    'forward/private/getsubfield.m',
    'inverse/private/getsubfield.m',
    'plotting/private/getsubfield.m',
    'private/getsubfield.m',
    'qsub/private/getsubfield.m',
    'specest/private/getsubfield.m',
    'statfun/private/getsubfield.m',
    'utilities/getsubfield.m'
  ],
  [
    'private/getusername.m',
    'qsub/private/getusername.m',
    'utilities/private/getusername.m'
  ],
  [
    'private/globalrescale.m',
    'utilities/private/globalrescale.m'
  ],
  [
    'fileio/private/hasyokogawa.m',
    'forward/private/hasyokogawa.m',
    'inverse/private/hasyokogawa.m',
    'utilities/hasyokogawa.m'
  ],
  [
    'forward/private/headsurface.m',
    'inverse/private/headsurface.m',
    'plotting/private/headsurface.m',
    'private/headsurface.m'
  ],
  [
    'private/htmlcolors.m',
    'plotting/private/htmlcolors.m'
  ],
  [
    'private/ignorefields.m',
    'utilities/private/ignorefields.m',
    'fileio/private/ignorefields.m',
    'contrib/misc/private/ignorefields.m'
  ],
  [
    'plotting/private/inside_contour.m',
    'private/inside_contour.m'
  ],
  [
    'plotting/private/intersect_line.m',
    'private/intersect_line.m'
  ],
  [
    'connectivity/private/inv2x2.m',
    'src/inv2x2.m'
  ],
  [
    'connectivity/private/inv2x2.mexa64',
    'src/inv2x2.mexa64'
  ],
  [
    'connectivity/private/inv2x2.mexglx',
    'src/inv2x2.mexglx'
  ],
  [
    'connectivity/private/inv2x2.mexmaci',
    'src/inv2x2.mexmaci'
  ],
  [
    'connectivity/private/inv2x2.mexmaci64',
    'private/inv2x2.mexmaci64',
    'src/inv2x2.mexmaci64'
  ],
  [
    'connectivity/private/inv2x2.mexw32',
    'private/inv2x2.mexw32',
    'src/inv2x2.mexw32'
  ],
  [
    'connectivity/private/inv2x2.mexw64',
    'private/inv2x2.mexw64',
    'src/inv2x2.mexw64'
  ],
  [
    'connectivity/private/inv3x3.m',
    'private/inv3x3.m',
    'src/inv3x3.m'
  ],
  [
    'connectivity/private/inv3x3.mexa64',
    'private/inv3x3.mexa64',
    'src/inv3x3.mexa64'
  ],
  [
    'connectivity/private/inv3x3.mexglx',
    'private/inv3x3.mexglx',
    'src/inv3x3.mexglx'
  ],
  [
    'connectivity/private/inv3x3.mexmaca64',
    'private/inv3x3.mexmaca64',
    'src/inv3x3.mexmaca64'
  ],
  [
    'connectivity/private/inv3x3.mexmaci',
    'private/inv3x3.mexmaci',
    'src/inv3x3.mexmaci'
  ],
  [
    'connectivity/private/inv3x3.mexmaci64',
    'private/inv3x3.mexmaci64',
    'src/inv3x3.mexmaci64'
  ],
  [
    'connectivity/private/inv3x3.mexw32',
    'private/inv3x3.mexw32',
    'src/inv3x3.mexw32'
  ],
  [
    'connectivity/private/inv3x3.mexw64',
    'private/inv3x3.mexw64',
    'src/inv3x3.mexw64'
  ],
  [
    'preproc/private/invfirwsord.m',
    'specest/private/invfirwsord.m'
  ],
  [
    'test/private/isalmostequal.m',
    'private/isalmostequal.m',
    'preproc/private/isalmostequal.m',
    'specest/private/isalmostequal.m'
  ],
  [
    'fileio/private/isdir_or_mkdir.m',
    'private/isdir_or_mkdir.m'
  ],
  [
    'compat/matlablt2017b/isfile.m',
    'compat/octave/isfile.m'
  ],
  [
    'compat/matlablt2017b/isfolder.m',
    'compat/octave/isfolder.m'
  ],
  [
    'private/ismatch.m',
    'trialfun/private/ismatch.m'
  ],
  [
    'contrib/spike/private/isrealmat.m',
    'private/isrealmat.m'
  ],
  [
    'contrib/spike/private/isrealvec.m',
    'private/isrealvec.m'
  ],
  [
    'connectivity/private/issubfield.m',
    'fileio/private/issubfield.m',
    'forward/private/issubfield.m',
    'inverse/private/issubfield.m',
    'plotting/private/issubfield.m',
    'private/issubfield.m',
    'qsub/private/issubfield.m',
    'specest/private/issubfield.m',
    'statfun/private/issubfield.m',
    'utilities/issubfield.m'
  ],
  [
    'connectivity/private/istrue.m',
    'fileio/private/istrue.m',
    'forward/private/istrue.m',
    'plotting/private/istrue.m',
    'preproc/private/istrue.m',
    'qsub/private/istrue.m',
    'specest/private/istrue.m',
    'statfun/private/istrue.m',
    'utilities/istrue.m'
  ],
  [
    'fileio/private/jaga16_packet.m',
    'realtime/example/private/jaga16_packet.m'
  ],
  [
    'preproc/private/kaiserbeta.m',
    'specest/private/kaiserbeta.m'
  ],
  [
    'connectivity/private/keyval.m',
    'fileio/private/keyval.m',
    'forward/private/keyval.m',
    'inverse/private/keyval.m',
    'plotting/private/keyval.m',
    'preproc/private/keyval.m',
    'specest/private/keyval.m',
    'utilities/keyval.m'
  ],
  [
    'plotting/private/keyvalcheck.m',
    'specest/private/keyvalcheck.m',
    'utilities/keyvalcheck.m'
  ],
  [
    'fileio/private/labelcmb2indx.m',
    'private/labelcmb2indx.m',
    'utilities/private/labelcmb2indx.m'
  ],
  [
    'forward/private/lmoutr.m',
    'private/lmoutr.m',
    'utilities/private/lmoutr.m'
  ],
  [
    'forward/private/lmoutr.mexa64',
    'private/lmoutr.mexa64',
    'src/lmoutr.mexa64',
    'utilities/private/lmoutr.mexa64'
  ],
  [
    'forward/private/lmoutr.mexglx',
    'private/lmoutr.mexglx',
    'src/lmoutr.mexglx',
    'utilities/private/lmoutr.mexglx'
  ],
  [
    'forward/private/lmoutr.mexmac',
    'private/lmoutr.mexmac',
    'src/lmoutr.mexmac',
    'utilities/private/lmoutr.mexmac'
  ],
  [
    'forward/private/lmoutr.mexmaca64',
    'private/lmoutr.mexmaca64',
    'src/lmoutr.mexmaca64',
    'utilities/private/lmoutr.mexmaca64'
  ],
  [
    'forward/private/lmoutr.mexmaci',
    'private/lmoutr.mexmaci',
    'src/lmoutr.mexmaci',
    'utilities/private/lmoutr.mexmaci'
  ],
  [
    'forward/private/lmoutr.mexmaci64',
    'private/lmoutr.mexmaci64',
    'src/lmoutr.mexmaci64',
    'utilities/private/lmoutr.mexmaci64'
  ],
  [
    'forward/private/lmoutr.mexw32',
    'private/lmoutr.mexw32',
    'src/lmoutr.mexw32',
    'utilities/private/lmoutr.mexw32'
  ],
  [
    'forward/private/lmoutr.mexw64',
    'private/lmoutr.mexw64',
    'src/lmoutr.mexw64',
    'utilities/private/lmoutr.mexw64'
  ],
  [
    'private/lmoutrn.m',
    'plotting/private/lmoutrn.m',
    'forward/private/lmoutrn.m',
    'utilities/private/lmoutrn.m'
  ],
  [
    'external/dipoli/loadama.m',
    'fileio/private/loadama.m',
    'forward/private/loadama.m'
  ],
  [
    'fileio/private/loadvar.m',
    'private/loadvar.m',
    'test/private/loadvar.m',
    'utilities/private/loadvar.m'
  ],
  [
    'plotting/private/ltrisect.mexa64',
    'private/ltrisect.mexa64',
    'src/ltrisect.mexa64'
  ],
  [
    'plotting/private/ltrisect.mexglx',
    'private/ltrisect.mexglx',
    'src/ltrisect.mexglx'
  ],
  [
    'plotting/private/ltrisect.mexmac',
    'private/ltrisect.mexmac',
    'src/ltrisect.mexmac'
  ],
  [
    'plotting/private/ltrisect.mexmaca64',
    'private/ltrisect.mexmaca64',
    'src/ltrisect.mexmaca64'
  ],
  [
    'plotting/private/ltrisect.mexmaci',
    'private/ltrisect.mexmaci',
    'src/ltrisect.mexmaci'
  ],
  [
    'plotting/private/ltrisect.mexmaci64',
    'private/ltrisect.mexmaci64',
    'src/ltrisect.mexmaci64'
  ],
  [
    'plotting/private/ltrisect.mexw32',
    'private/ltrisect.mexw32',
    'src/ltrisect.mexw32'
  ],
  [
    'plotting/private/ltrisect.mexw64',
    'private/ltrisect.mexw64',
    'src/ltrisect.mexw64'
  ],
  [
    'utilities/private/makessense.m',
    'fileio/private/makessense.m'
  ],
  [
    'fileio/private/match_str.m',
    'forward/private/match_str.m',
    'plotting/private/match_str.m',
    'utilities/match_str.m'
  ],
  [
    'forward/private/meg_leadfield1.mexa64',
    'src/meg_leadfield1.mexa64'
  ],
  [
    'forward/private/meg_leadfield1.mexglx',
    'src/meg_leadfield1.mexglx'
  ],
  [
    'forward/private/meg_leadfield1.mexmac',
    'src/meg_leadfield1.mexmac'
  ],
  [
    'forward/private/meg_leadfield1.mexmaca64',
    'src/meg_leadfield1.mexmaca64'
  ],
  [
    'forward/private/meg_leadfield1.mexmaci',
    'src/meg_leadfield1.mexmaci'
  ],
  [
    'forward/private/meg_leadfield1.mexmaci64',
    'src/meg_leadfield1.mexmaci64'
  ],
  [
    'forward/private/meg_leadfield1.mexw32',
    'src/meg_leadfield1.mexw32'
  ],
  [
    'forward/private/meg_leadfield1.mexw64',
    'src/meg_leadfield1.mexw64'
  ],
  [
    'qsub/private/memprofile.m',
    'utilities/private/memprofile.m'
  ],
  [
    'qsub/private/memprofile.mexa64',
    'utilities/private/memprofile.mexa64'
  ],
  [
    'qsub/private/memprofile.mexglx',
    'utilities/private/memprofile.mexglx'
  ],
  [
    'qsub/private/memprofile.mexmaca64',
    'utilities/private/memprofile.mexmaca64'
  ],
  [
    'qsub/private/memprofile.mexmaci',
    'utilities/private/memprofile.mexmaci'
  ],
  [
    'qsub/private/memprofile.mexmaci64',
    'utilities/private/memprofile.mexmaci64'
  ],
  [
    'private/mergestruct.m',
    'test/private/mergestruct.m',
    'utilities/private/mergestruct.m'
  ],
  [
    'private/mesh2edge.m',
    'forward/private/mesh2edge.m',
    'plotting/private/mesh2edge.m'
  ],
  [
    'external/openmeeg/mesh_icosahedron.m',
    'external/bemcp/mesh_icosahedron.m',
    'external/dipoli/mesh_icosahedron.m',
    'forward/private/mesh_icosahedron.m',
    'plotting/private/mesh_icosahedron.m',
    'private/mesh_icosahedron.m',
    'test/private/mesh_icosahedron.m',
    'utilities/private/mesh_icosahedron.m'
  ],
  [
    'external/openmeeg/mesh_octahedron.m',
    'external/bemcp/mesh_octahedron.m',
    'external/dipoli/mesh_octahedron.m',
    'forward/private/mesh_octahedron.m',
    'plotting/private/mesh_octahedron.m',
    'private/mesh_octahedron.m',
    'test/private/mesh_octahedron.m',
    'utilities/private/mesh_octahedron.m'
  ],
  [
    'external/bemcp/mesh_sphere.m',
    'external/dipoli/mesh_sphere.m',
    'external/openmeeg/mesh_sphere.m',
    'forward/private/mesh_sphere.m',
    'plotting/private/mesh_sphere.m',
    'private/mesh_sphere.m',
    'test/private/mesh_sphere.m',
    'utilities/private/mesh_sphere.m'
  ],
  [
    'external/openmeeg/mesh_tetrahedron.m',
    'external/bemcp/mesh_tetrahedron.m',
    'external/dipoli/mesh_tetrahedron.m',
    'forward/private/mesh_tetrahedron.m',
    'plotting/private/mesh_tetrahedron.m',
    'private/mesh_tetrahedron.m',
    'test/private/mesh_tetrahedron.m',
    'utilities/private/mesh_tetrahedron.m'
  ],
  [
    'connectivity/private/mtimes2x2.m',
    'private/mtimes2x2.m',
    'src/mtimes2x2.m'
  ],
  [
    'connectivity/private/mtimes2x2.mexa64',
    'private/mtimes2x2.mexa64',
    'src/mtimes2x2.mexa64'
  ],
  [
    'connectivity/private/mtimes2x2.mexglx',
    'private/mtimes2x2.mexglx',
    'src/mtimes2x2.mexglx',
    'connectivity/private/mtimes2x2.mexglx',
    'private/mtimes2x2.mexglx'
  ],
  [
    'src/mtimes2x2.mexmaca64'
  ],
  [
    'connectivity/private/mtimes2x2.mexmaci',
    'private/mtimes2x2.mexmaci',
    'src/mtimes2x2.mexmaci'
  ],
  [
    'connectivity/private/mtimes2x2.mexmaci64',
    'private/mtimes2x2.mexmaci64',
    'src/mtimes2x2.mexmaci64'
  ],
  [
    'connectivity/private/mtimes2x2.mexw32',
    'private/mtimes2x2.mexw32',
    'src/mtimes2x2.mexw32'
  ],
  [
    'connectivity/private/mtimes2x2.mexw64',
    'private/mtimes2x2.mexw64',
    'src/mtimes2x2.mexw64'
  ],
  [
    'connectivity/private/mtimes3x3.m',
    'private/mtimes3x3.m',
    'src/mtimes3x3.m'
  ],
  [
    'connectivity/private/mtimes3x3.mexa64',
    'private/mtimes3x3.mexa64',
    'src/mtimes3x3.mexa64'
  ],
  [
    'connectivity/private/mtimes3x3.mexglx',
    'private/mtimes3x3.mexglx',
    'src/mtimes3x3.mexglx'
  ],
  [
    'connectivity/private/mtimes3x3.mexmaca64',
    'private/mtimes3x3.mexmaca64',
    'src/mtimes3x3.mexmaca64'
  ],
  [
    'connectivity/private/mtimes3x3.mexmaci',
    'private/mtimes3x3.mexmaci',
    'src/mtimes3x3.mexmaci'
  ],
  [
    'connectivity/private/mtimes3x3.mexmaci64',
    'private/mtimes3x3.mexmaci64',
    'src/mtimes3x3.mexmaci64'
  ],
  [
    'connectivity/private/mtimes3x3.mexw32',
    'private/mtimes3x3.mexw32',
    'src/mtimes3x3.mexw32'
  ],
  [
    'connectivity/private/mtimes3x3.mexw64',
    'private/mtimes3x3.mexw64',
    'src/mtimes3x3.mexw64'
  ],
  [
    'connectivity/private/multivariate_decomp.m',
    'private/multivariate_decomp.m'
  ],
  [
    'fileio/private/mxDeserialize.m',
    'private/mxDeserialize.m',
    'src/mxDeserialize.m'
  ],
  [
    'fileio/private/mxDeserialize_c.mexa64',
    'private/mxDeserialize_c.mexa64',
    'src/mxDeserialize_c.mexa64'
  ],
  [
    'fileio/private/mxDeserialize_c.mexglx',
    'private/mxDeserialize_c.mexglx',
    'src/mxDeserialize_c.mexglx'
  ],
  [
    'fileio/private/mxDeserialize_c.mexmac',
    'private/mxDeserialize_c.mexmac',
    'src/mxDeserialize_c.mexmac'
  ],
  [
    'fileio/private/mxDeserialize_c.mexmaca64',
    'private/mxDeserialize_c.mexmaca64',
    'src/mxDeserialize_c.mexmaca64'
  ],
  [
    'fileio/private/mxDeserialize_c.mexmaci',
    'private/mxDeserialize_c.mexmaci',
    'src/mxDeserialize_c.mexmaci'
  ],
  [
    'fileio/private/mxDeserialize_c.mexmaci64',
    'private/mxDeserialize_c.mexmaci64',
    'src/mxDeserialize_c.mexmaci64'
  ],
  [
    'fileio/private/mxDeserialize_c.mexw32',
    'private/mxDeserialize_c.mexw32',
    'src/mxDeserialize_c.mexw32'
  ],
  [
    'fileio/private/mxDeserialize_c.mexw64',
    'private/mxDeserialize_c.mexw64',
    'src/mxDeserialize_c.mexw64'
  ],
  [
    'fileio/private/mxDeserialize_cpp.mexa64',
    'private/mxDeserialize_cpp.mexa64',
    'src/mxDeserialize_cpp.mexa64',
    'utilities/private/mxDeserialize_cpp.mexa64'
  ],
  [
    'fileio/private/mxDeserialize_cpp.mexmaci64',
    'private/mxDeserialize_cpp.mexmaci64',
    'src/mxDeserialize_cpp.mexmaci64',
    'utilities/private/mxDeserialize_cpp.mexmaci64'
  ],
  [
    'fileio/private/mxDeserialize_cpp.mexw32',
    'private/mxDeserialize_cpp.mexw32',
    'src/mxDeserialize_cpp.mexw32',
    'utilities/private/mxDeserialize_cpp.mexw32'
  ],
  [
    'fileio/private/mxSerialize.m',
    'private/mxSerialize.m',
    'src/mxSerialize.m',
    'utilities/private/mxSerialize.m'
  ],
  [
    'fileio/private/mxSerialize_c.mexa64',
    'private/mxSerialize_c.mexa64',
    'src/mxSerialize_c.mexa64',
    'utilities/private/mxSerialize_c.mexa64'
  ],
  [
    'fileio/private/mxSerialize_c.mexglx',
    'private/mxSerialize_c.mexglx',
    'src/mxSerialize_c.mexglx',
    'utilities/private/mxSerialize_c.mexglx'
  ],
  [
    'fileio/private/mxSerialize_c.mexmac',
    'private/mxSerialize_c.mexmac',
    'src/mxSerialize_c.mexmac',
    'utilities/private/mxSerialize_c.mexmac'
  ],
  [
    'fileio/private/mxSerialize_c.mexmaca64',
    'private/mxSerialize_c.mexmaca64',
    'src/mxSerialize_c.mexmaca64',
    'utilities/private/mxSerialize_c.mexmaca64'
  ],
  [
    'fileio/private/mxSerialize_c.mexmaci',
    'private/mxSerialize_c.mexmaci',
    'src/mxSerialize_c.mexmaci',
    'utilities/private/mxSerialize_c.mexmaci'
  ],
  [
    'fileio/private/mxSerialize_c.mexmaci64',
    'private/mxSerialize_c.mexmaci64',
    'src/mxSerialize_c.mexmaci64',
    'utilities/private/mxSerialize_c.mexmaci64'
  ],
  [
    'fileio/private/mxSerialize_c.mexw32',
    'private/mxSerialize_c.mexw32',
    'src/mxSerialize_c.mexw32',
    'utilities/private/mxSerialize_c.mexw32'
  ],
  [
    'fileio/private/mxSerialize_c.mexw64',
    'private/mxSerialize_c.mexw64',
    'src/mxSerialize_c.mexw64',
    'utilities/private/mxSerialize_c.mexw64'
  ],
  [
    'fileio/private/mxSerialize_cpp.mexa64',
    'private/mxSerialize_cpp.mexa64',
    'src/mxSerialize_cpp.mexa64',
    'utilities/private/mxSerialize_cpp.mexa64'
  ],
  [
    'fileio/private/mxSerialize_cpp.mexmaca64',
    'private/mxSerialize_cpp.mexmaca64',
    'src/mxSerialize_cpp.mexmaca64',
    'utilities/private/mxSerialize_cpp.mexmaca64'
  ],
  [
    'fileio/private/mxSerialize_cpp.mexmaci64',
    'private/mxSerialize_cpp.mexmaci64',
    'src/mxSerialize_cpp.mexmaci64',
    'utilities/private/mxSerialize_cpp.mexmaci64'
  ],
  [
    'fileio/private/mxSerialize_cpp.mexw32',
    'private/mxSerialize_cpp.mexw32',
    'src/mxSerialize_cpp.mexw32',
    'utilities/private/mxSerialize_cpp.mexw32'
  ],
  [
    'fileio/private/mxSerialize_cpp.mexw64',
    'private/mxSerialize_cpp.mexw64',
    'src/mxSerialize_cpp.mexw64',
    'utilities/private/mxSerialize_cpp.mexw64'
  ],
  [
    'external/stats/nanmean.m',
    'src/nanmean.m'
  ],
  [
    'external/stats/nanmean.mexa64',
    'src/nanmean.mexa64'
  ],
  [
    'external/stats/nanmean.mexmaca64',
    'src/nanmean.mexmaca64'
  ],
  [
    'external/stats/nanmean.mexmaci',
    'src/nanmean.mexmaci'
  ],
  [
    'external/stats/nanmean.mexmaci64',
    'src/nanmean.mexmaci64'
  ],
  [
    'external/stats/nanmean.mexw32',
    'src/nanmean.mexw32'
  ],
  [
    'external/stats/nanmean.mexw64',
    'src/nanmean.mexw64'
  ],
  [
    'external/stats/nanstd.m',
    'src/nanstd.m'
  ],
  [
    'external/stats/nanstd.mexa64',
    'src/nanstd.mexa64'
  ],
  [
    'external/stats/nanstd.mexmaca64',
    'src/nanstd.mexmaca64'
  ],
  [
    'external/stats/nanstd.mexmaci',
    'src/nanstd.mexmaci'
  ],
  [
    'external/stats/nanstd.mexmaci64',
    'src/nanstd.mexmaci64'
  ],
  [
    'external/stats/nanstd.mexw32',
    'src/nanstd.mexw32'
  ],
  [
    'external/stats/nanstd.mexw64',
    'src/nanstd.mexw64'
  ],
  [
    'external/stats/nansum.m',
    'src/nansum.m'
  ],
  [
    'external/stats/nansum.mexa64',
    'src/nansum.mexa64'
  ],
  [
    'external/stats/nansum.mexmaca64',
    'src/nansum.mexmaca64'
  ],
  [
    'external/stats/nansum.mexmaci',
    'src/nansum.mexmaci'
  ],
  [
    'external/stats/nansum.mexmaci64',
    'src/nansum.mexmaci64'
  ],
  [
    'external/stats/nansum.mexw32',
    'src/nansum.mexw32'
  ],
  [
    'external/stats/nansum.mexw64',
    'src/nansum.mexw64'
  ],
  [
    'external/stats/nanvar.m',
    'src/nanvar.m'
  ],
  [
    'external/stats/nanvar.mexa64',
    'src/nanvar.mexa64'
  ],
  [
    'external/stats/nanvar.mexmaca64',
    'src/nanvar.mexmaca64'
  ],
  [
    'external/stats/nanvar.mexmaci',
    'src/nanvar.mexmaci'
  ],
  [
    'external/stats/nanvar.mexmaci64',
    'src/nanvar.mexmaci64'
  ],
  [
    'external/stats/nanvar.mexw32',
    'src/nanvar.mexw32'
  ],
  [
    'external/stats/nanvar.mexw64',
    'src/nanvar.mexw64'
  ],
  [
    'fileio/private/ndgrid.m',
    'plotting/private/ndgrid.m',
    'private/ndgrid.m'
  ],
  [
    'utilities/nearest.m',
    'preproc/private/nearest.m'
  ],
  [
    'contrib/spike/private/neuralynx_crc.m',
    'fileio/private/neuralynx_crc.m'
  ],
  [
    'contrib/spike/private/neuralynx_getheader.m',
    'fileio/private/neuralynx_getheader.m'
  ],
  [
    'private/normals_elec.m.m',
    'plotting/private/normals_elec.m.m'
  ],
  [
    'contrib/spike/private/offset2time.m',
    'private/offset2time.m',
    'utilities/private/offset2time.m'
  ],
  [
    'private/open_figure.m',
    'realtime/online_meg/private/open_figure.m'
  ],
  [
    'private/outline_shape.m',
    'plotting/private/outline_shape.m'
  ],
  [
    'contrib/nutmegtrip/private/parameterselection.m',
    'fileio/private/parameterselection.m',
    'private/parameterselection.m',
    'utilities/private/parameterselection.m'
  ],
  [
    'private/parsekeyboardevent.m',
    'realtime/online_meg/private/parsekeyboardevent.m'
  ],
  [
    'contrib/spike/private/peakdetect3.m',
    'private/peakdetect3.m'
  ],
  [
    'private/pinvNx2.m',
    'plotting/private/pinvNx2.m',
    'forward/private/pinvNx2.m',
    'utilities/private/pinvNx2.m'
  ],
  [
    'realtime/src/buffer/src/platform.h',
    'src/platform.h'
  ],
  [
    'forward/private/plgndr.c',
    'private/plgndr.c',
    'src/plgndr.c'
  ],
  [
    'forward/private/plgndr.m',
    'private/plgndr.m',
    'src/plgndr.m'
  ],
  [
    'forward/private/plgndr.mexa64',
    'private/plgndr.mexa64',
    'src/plgndr.mexa64'
  ],
  [
    'forward/private/plgndr.mexglx',
    'private/plgndr.mexglx',
    'src/plgndr.mexglx'
  ],
  [
    'forward/private/plgndr.mexmac',
    'private/plgndr.mexmac',
    'src/plgndr.mexmac'
  ],
  [
    'forward/private/plgndr.mexmaca64',
    'private/plgndr.mexmaca64',
    'src/plgndr.mexmaca64'
  ],
  [
    'forward/private/plgndr.mexmaci',
    'private/plgndr.mexmaci',
    'src/plgndr.mexmaci'
  ],
  [
    'forward/private/plgndr.mexmaci64',
    'private/plgndr.mexmaci64',
    'src/plgndr.mexmaci64'
  ],
  [
    'forward/private/plgndr.mexw32',
    'private/plgndr.mexw32',
    'src/plgndr.mexw32'
  ],
  [
    'forward/private/plgndr.mexw64',
    'private/plgndr.mexw64',
    'src/plgndr.mexw64'
  ],
  [
    'forward/private/plinprojn.m',
    'private/plinprojn.m',
    'utilities/private/plinprojn.m'
  ],
  [
    'fileio/private/pos2dim.m',
    'private/pos2dim.m',
    'utilities/private/pos2dim.m'
  ],
  [
    'fileio/private/pos2dim3d.m',
    'private/pos2dim3d.m'
  ],
  [
    'fileio/private/pos2transform.m',
    'private/pos2transform.m',
    'utilities/private/pos2transform.m'
  ],
  [
    'contrib/spike/private/preproc.m',
    'private/preproc.m'
  ],
  [
    'qsub/private/print_mem.m'
  ],
  [
    'private/print_tim.m',
    'qsub/private/print_tim.m'
  ],
  [
    'utilities/private/printor.m',
    'fileio/private/printor.m'
  ],
  [
    'forward/private/project_elec.m',
    'private/project_elec.m',
    'utilities/private/project_elec.m'
  ],
  [
    'forward/private/projecttri.m',
    'plotting/private/projecttri.m',
    'private/projecttri.m'
  ],
  [
    'realtime/src/external/pthreads-win64/lib/pthreadGC2-w64.dll'
  ],
  [
    'fileio/private/pthreadGC2.dll',
    'realtime/bin/win32/pthreadGC2.dll',
    'realtime/src/external/pthreads-win32/lib/pthreadGC2.dll'
  ],
  [
    'forward/private/ptriproj.m',
    'private/ptriproj.m',
    'utilities/private/ptriproj.m'
  ],
  [
    'forward/private/ptriproj.mexa64',
    'private/ptriproj.mexa64',
    'src/ptriproj.mexa64',
    'utilities/private/ptriproj.mexa64'
  ],
  [
    'forward/private/ptriproj.mexglx',
    'private/ptriproj.mexglx',
    'src/ptriproj.mexglx',
    'utilities/private/ptriproj.mexglx'
  ],
  [
    'forward/private/ptriproj.mexmac',
    'private/ptriproj.mexmac',
    'src/ptriproj.mexmac',
    'utilities/private/ptriproj.mexmac'
  ],
  [
    'forward/private/ptriproj.mexmaca64',
    'private/ptriproj.mexmaca64',
    'src/ptriproj.mexmaca64',
    'utilities/private/ptriproj.mexmaca64'
  ],
  [
    'forward/private/ptriproj.mexmaci',
    'private/ptriproj.mexmaci',
    'src/ptriproj.mexmaci',
    'utilities/private/ptriproj.mexmaci'
  ],
  [
    'forward/private/ptriproj.mexmaci64',
    'private/ptriproj.mexmaci64',
    'src/ptriproj.mexmaci64',
    'utilities/private/ptriproj.mexmaci64'
  ],
  [
    'forward/private/ptriproj.mexw32',
    'private/ptriproj.mexw32',
    'src/ptriproj.mexw32',
    'utilities/private/ptriproj.mexw32'
  ],
  [
    'forward/private/ptriproj.mexw64',
    'private/ptriproj.mexw64',
    'src/ptriproj.mexw64',
    'utilities/private/ptriproj.mexw64'
  ],
  [
    'forward/private/ptriprojn.m',
    'private/ptriprojn.m',
    'utilities/private/ptriprojn.m'
  ],
  [
    'plotting/private/ptriside.m',
    'private/ptriside.m'
  ],
  [
    'fileio/private/quaternion.m',
    'inverse/private/quaternion.m',
    'plotting/private/quaternion.m',
    'private/quaternion.m',
    'utilities/private/quaternion.m'
  ],
  [
    'test/private/randomseed.m',
    'utilities/private/randomseed.m'
  ],
  [
    'fileio/private/read_16bit.mexa64',
    'src/read_16bit.mexa64'
  ],
  [
    'fileio/private/read_16bit.mexglx',
    'src/read_16bit.mexglx'
  ],
  [
    'fileio/private/read_16bit.mexmaci',
    'src/read_16bit.mexmaci'
  ],
  [
    'fileio/private/read_16bit.mexmaci64',
    'src/read_16bit.mexmaci64'
  ],
  [
    'fileio/private/read_16bit.mexw32',
    'src/read_16bit.mexw32'
  ],
  [
    'fileio/private/read_16bit.mexw64',
    'src/read_16bit.mexw64'
  ],
  [
    'fileio/private/read_24bit.mexa64',
    'src/read_24bit.mexa64'
  ],
  [
    'fileio/private/read_24bit.mexglx',
    'src/read_24bit.mexglx'
  ],
  [
    'fileio/private/read_24bit.mexmac',
    'src/read_24bit.mexmac'
  ],
  [
    'fileio/private/read_24bit.mexmaca64',
    'src/read_24bit.mexmaca64'
  ],
  [
    'fileio/private/read_24bit.mexmaci',
    'src/read_24bit.mexmaci'
  ],
  [
    'fileio/private/read_24bit.mexmaci64',
    'src/read_24bit.mexmaci64'
  ],
  [
    'fileio/private/read_24bit.mexw32',
    'src/read_24bit.mexw32'
  ],
  [
    'fileio/private/read_24bit.mexw64',
    'src/read_24bit.mexw64'
  ],
  [
    'fileio/private/read_besa_avr.m',
    'private/read_besa_avr.m'
  ],
  [
    'fileio/private/read_besa_swf.m',
    'private/read_besa_swf.m'
  ],
  [
    'fileio/private/read_ctf_hc.m',
    'private/read_ctf_hc.m'
  ],
  [
    'fileio/private/read_ctf_hist.m',
    'private/read_ctf_hist.m'
  ],
  [
    'fileio/private/read_ctf_shm.mexglx',
    'src/read_ctf_shm.mexglx'
  ],
  [
    'contrib/spike/private/read_neuralynx_dma.m',
    'fileio/private/read_neuralynx_dma.m'
  ],
  [
    'external/bemcp/refine.m',
    'external/dipoli/private/refine.m',
    'external/openmeeg/private/refine.m',
    'forward/private/refine.m',
    'plotting/private/refine.m',
    'fileio/private/refine.m',
    'private/refine.m',
    'test/private/refine.m',
    'utilities/private/refine.m'
  ],
  [
    'private/remove_double_vertices.m',
    'forward/private/remove_double_vertices.m',
    'fileio/private/remove_double_vertices.m'
  ],
  [
    'private/remove_unused_vertices.m',
    'forward/private/remove_unused_vertices.m',
    'fileio/private/remove_unused_vertices.m'
  ],
  [
    'private/remove_vertices.m',
    'fileio/private/remove_vertices.m',
    'forward/private/remove_vertices.m',
    'plotting/private/remove_vertices.m'
  ],
  [
    'qsub/private/rename.mexa64',
    'src/rename.mexa64'
  ],
  [
    'qsub/private/rename.mexmaca64',
    'src/rename.mexmaca64'
  ],
  [
    'qsub/private/rename.mexmaci',
    'src/rename.mexmaci'
  ],
  [
    'qsub/private/rename.mexmaci64',
    'src/rename.mexmaci64'
  ],
  [
    'forward/private/retriangulate.m',
    'private/retriangulate.m'
  ],
  [
    'fileio/private/rfbevent.mexa64',
    'src/rfbevent.mexa64'
  ],
  [
    'fileio/private/rfbevent.mexglx',
    'src/rfbevent.mexglx'
  ],
  [
    'fileio/private/rfbevent.mexmac',
    'src/rfbevent.mexmac'
  ],
  [
    'fileio/private/rfbevent.mexmaca64',
    'src/rfbevent.mexmaca64'
  ],
  [
    'fileio/private/rfbevent.mexmaci64',
    'src/rfbevent.mexmaci64'
  ],
  [
    'inverse/private/rigidbody.m',
    'private/rigidbody.m',
    'utilities/private/rigidbody.m'
  ],
  [
    'connectivity/private/rmsubfield.m',
    'fileio/private/rmsubfield.m',
    'forward/private/rmsubfield.m',
    'plotting/private/rmsubfield.m',
    'private/rmsubfield.m',
    'qsub/private/rmsubfield.m',
    'specest/private/rmsubfield.m',
    'statfun/private/rmsubfield.m',
    'test/private/rmsubfield.m',
    'utilities/rmsubfield.m'
  ],
  [
    'private/rollback_provenance.m',
    'contrib/misc/private/rollback_provenance.m'
  ],
  [
    'fileio/private/rotate.m',
    'inverse/private/rotate.m',
    'plotting/private/rotate.m',
    'private/rotate.m',
    'utilities/private/rotate.m'
  ],
  [
    'forward/private/routlm.mexa64',
    'private/routlm.mexa64',
    'src/routlm.mexa64'
  ],
  [
    'forward/private/routlm.mexglx',
    'private/routlm.mexglx',
    'src/routlm.mexglx'
  ],
  [
    'forward/private/routlm.mexmac',
    'private/routlm.mexmac',
    'src/routlm.mexmac'
  ],
  [
    'forward/private/routlm.mexmaca64',
    'private/routlm.mexmaca64',
    'src/routlm.mexmaca64'
  ],
  [
    'forward/private/routlm.mexmaci',
    'private/routlm.mexmaci',
    'src/routlm.mexmaci'
  ],
  [
    'forward/private/routlm.mexmaci64',
    'private/routlm.mexmaci64',
    'src/routlm.mexmaci64'
  ],
  [
    'forward/private/routlm.mexw32',
    'private/routlm.mexw32',
    'src/routlm.mexw32'
  ],
  [
    'forward/private/routlm.mexw64',
    'private/routlm.mexw64',
    'src/routlm.mexw64'
  ],
  [
    'connectivity/private/sandwich2x2.m',
    'private/sandwich2x2.m',
    'src/sandwich2x2.m'
  ],
  [
    'connectivity/private/sandwich2x2.mexa64',
    'private/sandwich2x2.mexa64',
    'src/sandwich2x2.mexa64'
  ],
  [
    'connectivity/private/sandwich2x2.mexglx',
    'private/sandwich2x2.mexglx',
    'src/sandwich2x2.mexglx'
  ],
  [
    'connectivity/private/sandwich2x2.mexmaca64',
    'private/sandwich2x2.mexmaca64',
    'src/sandwich2x2.mexmaca64'
  ],
  [
    'connectivity/private/sandwich2x2.mexmaci',
    'private/sandwich2x2.mexmaci',
    'src/sandwich2x2.mexmaci'
  ],
  [
    'connectivity/private/sandwich2x2.mexmaci64',
    'private/sandwich2x2.mexmaci64',
    'src/sandwich2x2.mexmaci64'
  ],
  [
    'connectivity/private/sandwich2x2.mexw32',
    'private/sandwich2x2.mexw32',
    'src/sandwich2x2.mexw32'
  ],
  [
    'connectivity/private/sandwich2x2.mexw64',
    'private/sandwich2x2.mexw64',
    'src/sandwich2x2.mexw64'
  ],
  [
    'connectivity/private/sandwich3x3.m',
    'private/sandwich3x3.m',
    'src/sandwich3x3.m'
  ],
  [
    'connectivity/private/sandwich3x3.mexa64',
    'private/sandwich3x3.mexa64',
    'src/sandwich3x3.mexa64'
  ],
  [
    'connectivity/private/sandwich3x3.mexglx',
    'private/sandwich3x3.mexglx',
    'src/sandwich3x3.mexglx'
  ],
  [
    'connectivity/private/sandwich3x3.mexmaca64',
    'private/sandwich3x3.mexmaca64',
    'src/sandwich3x3.mexmaca64'
  ],
  [
    'connectivity/private/sandwich3x3.mexmaci',
    'private/sandwich3x3.mexmaci',
    'src/sandwich3x3.mexmaci'
  ],
  [
    'connectivity/private/sandwich3x3.mexmaci64',
    'private/sandwich3x3.mexmaci64',
    'src/sandwich3x3.mexmaci64'
  ],
  [
    'connectivity/private/sandwich3x3.mexw32',
    'private/sandwich3x3.mexw32',
    'src/sandwich3x3.mexw32'
  ],
  [
    'connectivity/private/sandwich3x3.mexw64',
    'private/sandwich3x3.mexw64',
    'src/sandwich3x3.mexw64'
  ],
  [
    'fileio/private/sap2matlab.mexa64',
    'realtime/src/acquisition/siemens/src/sap2matlab.mexa64'
  ],
  [
    'fileio/private/sap2matlab.mexmaci64',
    'realtime/src/acquisition/siemens/src/sap2matlab.mexmaci64'
  ],
  [
    'fileio/private/sap2matlab.mexw32',
    'realtime/src/acquisition/siemens/src/sap2matlab.mexw32'
  ],
  [
    'private/savevar.m',
    'utilities/private/savevar.m'
  ],
  [
    'plotting/private/scale.m',
    'private/scale.m',
    'utilities/private/scale.m'
  ],
  [
    'plotting/private/select3d.m',
    'private/select3d.m'
  ],
  [
    'private/select_channel_list.m',
    'trialfun/private/select_channel_list.m'
  ],
  [
    'realtime/src/external/pthreads-win32/include/semaphore.h',
    'realtime/src/external/pthreads-win64/include/semaphore.h'
  ],
  [
    'realtime/src/acquisition/modeeg/serial.c',
    'realtime/src/acquisition/neurosky/serial.c',
    'realtime/src/acquisition/openbci/serial.c'
  ],
  [
    'realtime/src/acquisition/modeeg/serial.h',
    'realtime/src/acquisition/neurosky/serial.h',
    'realtime/src/acquisition/openbci/serial.h'
  ],
  [
    'qsub/private/setcustompath.m'
  ],
  [
    'qsub/private/setcustompwd.m'
  ],
  [
    'qsub/private/setglobal.m'
  ],
  [
    'connectivity/private/setsubfield.m',
    'fileio/private/setsubfield.m',
    'forward/private/setsubfield.m',
    'plotting/private/setsubfield.m',
    'private/setsubfield.m',
    'qsub/private/setsubfield.m',
    'specest/private/setsubfield.m',
    'statfun/private/setsubfield.m',
    'test/private/setsubfield.m',
    'utilities/setsubfield.m'
  ],
  [
    'private/setviewpoint.m',
    'plotting/private/setviewpoint.m'
  ],
  [
    'contrib/spike/private/sine_taper.m',
    'private/sine_taper.m',
    'specest/private/sine_taper.m'
  ],
  [
    'contrib/spike/private/smartinput.m',
    'private/smartinput.m',
    'utilities/private/smartinput.m'
  ],
  [
    'external/dipoli/private/solid_angle.m',
    'external/openmeeg/private/solid_angle.m',
    'fileio/private/solid_angle.m',
    'forward/private/solid_angle.m',
    'inverse/private/solid_angle.m',
    'plotting/private/solid_angle.m',
    'private/solid_angle.m',
    'src/solid_angle.m'
  ],
  [
    'external/dipoli/private/solid_angle.mexa64',
    'external/openmeeg/private/solid_angle.mexa64',
    'fileio/private/solid_angle.mexa64',
    'forward/private/solid_angle.mexa64',
    'inverse/private/solid_angle.mexa64',
    'plotting/private/solid_angle.mexa64',
    'private/solid_angle.mexa64',
    'src/solid_angle.mexa64'
  ],
  [
    'external/dipoli/private/solid_angle.mexglx',
    'external/openmeeg/private/solid_angle.mexglx',
    'forward/private/solid_angle.mexglx',
    'inverse/private/solid_angle.mexglx',
    'plotting/private/solid_angle.mexglx',
    'private/solid_angle.mexglx',
    'src/solid_angle.mexglx'
  ],
  [
    'external/dipoli/private/solid_angle.mexmac',
    'external/openmeeg/private/solid_angle.mexmac',
    'forward/private/solid_angle.mexmac',
    'inverse/private/solid_angle.mexmac',
    'plotting/private/solid_angle.mexmac',
    'private/solid_angle.mexmac',
    'src/solid_angle.mexmac'
  ],
  [
    'external/dipoli/private/solid_angle.mexmaca64',
    'external/openmeeg/private/solid_angle.mexmaca64',
    'forward/private/solid_angle.mexmaca64',
    'inverse/private/solid_angle.mexmaca64',
    'plotting/private/solid_angle.mexmaca64',
    'private/solid_angle.mexmaca64',
    'src/solid_angle.mexmaca64'
  ],
  [
    'external/dipoli/private/solid_angle.mexmaci',
    'external/openmeeg/private/solid_angle.mexmaci',
    'forward/private/solid_angle.mexmaci',
    'inverse/private/solid_angle.mexmaci',
    'plotting/private/solid_angle.mexmaci',
    'private/solid_angle.mexmaci',
    'src/solid_angle.mexmaci'
  ],
  [
    'external/dipoli/private/solid_angle.mexmaci64',
    'external/openmeeg/private/solid_angle.mexmaci64',
    'forward/private/solid_angle.mexmaci64',
    'inverse/private/solid_angle.mexmaci64',
    'plotting/private/solid_angle.mexmaci64',
    'private/solid_angle.mexmaci64',
    'src/solid_angle.mexmaci64'
  ],
  [
    'external/dipoli/private/solid_angle.mexw32',
    'external/openmeeg/private/solid_angle.mexw32',
    'forward/private/solid_angle.mexw32',
    'inverse/private/solid_angle.mexw32',
    'plotting/private/solid_angle.mexw32',
    'private/solid_angle.mexw32',
    'src/solid_angle.mexw32'
  ],
  [
    'external/dipoli/private/solid_angle.mexw64',
    'external/openmeeg/private/solid_angle.mexw64',
    'forward/private/solid_angle.mexw64',
    'inverse/private/solid_angle.mexw64',
    'plotting/private/solid_angle.mexw64',
    'private/solid_angle.mexw64',
    'src/solid_angle.mexw64'
  ],
  [
    'contrib/spike/private/specest_nanfft.m',
    'private/specest_nanfft.m'
  ],
  [
    'private/standardcolors.m',
    'plotting/private/standardcolors.m'
  ],
  [
    'connectivity/private/standardise.m',
    'private/standardise.m'
  ],
  [
    'matlablt2016b/startsWith.m',
    'octave/startsWith.m'
  ],
  [
    'private/strel_bol.m',
    'utilities/strel_bol.m'
  ],
  [
    'external/dipoli/private/surface_inside.m',
    'external/openmeeg/private/surface_inside.m',
    'fileio/private/surface_inside.m',
    'forward/private/surface_inside.m',
    'inverse/private/surface_inside.m',
    'private/surface_inside.m'
  ],
  [
    'external/openmeeg/private/surface_normals.m',
    'fileio/private/surface_normals.m',
    'forward/private/surface_normals.m',
    'plotting/private/surface_normals.m',
    'private/surface_normals.m',
    'test/private/surface_normals.m'
  ],
  [
    'forward/private/surface_orientation.m',
    'inverse/private/surface_orientation.m',
    'plotting/private/surface_orientation.m',
    'private/surface_orientation.m'
  ],
  [
    'forward/private/surface_shift.m',
    'private/surface_shift.m'
  ],
  [
    'fileio/private/time2offset.m',
    'private/time2offset.m',
    'utilities/private/time2offset.m'
  ],
  [
    'fileio/private/tokenize.m',
    'qsub/private/tokenize.m',
    'utilities/tokenize.m'
  ],
  [
    'private/traditional.m',
    'utilities/private/traditional.m'
  ],
  [
    'private/transfer2coeffs.m',
    'connectivity/private/transfer2coeffs.m'
  ],
  [
    'fileio/private/translate.m',
    'inverse/private/translate.m',
    'plotting/private/translate.m',
    'private/translate.m',
    'utilities/private/translate.m'
  ],
  [
    'private/triangle2connectivity.m',
    'plotting/private/triangle2connectivity.m'
  ],
  [
    'forward/private/triangle4pt.m',
    'private/triangle4pt.m'
  ],
  [
    'private/trl2boolvec.m',
    'external/dss/private/trl2boolvec.m'
  ],
  [
    'fileio/private/undobalancing.m',
    'forward/private/undobalancing.m',
    'plotting/private/undobalancing.m',
    'private/undobalancing.m',
    'utilities/private/undobalancing.m'
  ],
  [
    'private/unparcellate.m',
    'utilities/private/unparcellate.m'
  ],
  [
    'private/volumefillholes.m',
    'utilities/private/volumefillholes.m'
  ],
  [
    'private/volumeflip.m',
    'utilities/private/volumeflip.m'
  ],
  [
    'private/volumepermute.m',
    'utilities/private/volumepermute.m'
  ],
  [
    'private/volumesmooth.m',
    'utilities/private/volumesmooth.m'
  ],
  [
    'private/volumethreshold.m',
    'utilities/private/volumethreshold.m'
  ],
  [
    'qsub/private/watchdog.m'
  ],
  [
    'qsub/private/watchdog.mexa64'
  ],
  [
    'qsub/private/watchdog.mexglx'
  ],
  [
    'qsub/private/watchdog.mexmaca64'
  ],
  [
    'qsub/private/watchdog.mexmaci'
  ],
  [
    'qsub/private/watchdog.mexmaci64'
  ],
  [
    'preproc/private/windows.m',
    'specest/private/windows.m'
  ],
  [
    'fileio/private/write_ctf_shm.mexglx',
    'src/write_ctf_shm.mexglx'
  ],
]


def sync_files(file_list):
    '''
    Synchronize the contents of the given list of files by copying the most recently modified file to all others.
     '''

    if not file_list:
        return
    
    # Filter out non-existent files and get their modification times
    existing_files = []
    for file in file_list:
        if os.path.exists(file):
            existing_files.append(file)
    
    if not existing_files:
        return
    
    # Find the latest file (most recently modified)
    latest_file = max(existing_files, key=os.path.getmtime)
    
    # Copy the latest file to all other files
    for file in existing_files:
        if file != latest_file:
            try:
                # Use shutil.copy2 to preserve metadata
                import shutil
                shutil.copy2(latest_file, file)
                print(f"Synced: {latest_file} -> {file}")
            except Exception as e:
                print(f"Error syncing {latest_file} to {file}: {e}", file=sys.stderr)


if __name__ == "__main__":
    for file_list in sync_lists:
        sync_files(file_list)
