--- common.pm 2002/10/24 16:32:00 1.11 +++ common.pm 2002/10/27 21:20:33 1.12 @@ -41,7 +41,7 @@ # return: path on filesystem to data dir sub open_data_files { - my ($db_dir) = @_; + my ($db_dir,$debug) = @_; mkdir "$common::install_dir/$db_dir" if (!-e "$common::install_dir/$db_dir"); mkdir "$common::install_dir/$db_dir/data" if (!-e "$common::install_dir/$db_dir/data"); @@ -50,8 +50,11 @@ open(S,"> $dir/stream") || die "can't open output $dir/stream: $!"; open(R,"> $dir/bib") || die "can't open output $dir/bib: $!"; - open(MPS,"| $common::mpsindex -d $common::install_dir/$db_dir -autokey") || die "can't start MPS indexer $common::mpsindex: $!"; -# open(MPS,"> /tmp/mpsindex") || die "mps: $!"; + if (! $debug) { + open(MPS,"| $common::mpsindex -d $common::install_dir/$db_dir -autokey") || die "can't start MPS indexer $common::mpsindex: $!"; + } else { + open(MPS,"> /tmp/mpsindex") || die "mps: $!"; + } print S $common::mps_header; print MPS $common::mps_header;