| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
package Nightly; |
|---|
| 25 |
use strict; |
|---|
| 26 |
|
|---|
| 27 |
my $command; |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
sub CreateDir { |
|---|
| 32 |
my ($parms, $Nightly_subdir) = @_; |
|---|
| 33 |
my $debug = $$parms{"debug"}; |
|---|
| 34 |
my $Nightly_dirname = $$parms{"Nightly_dirname"}; |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
$command = ("rm -rf $Nightly_dirname"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
$command = ("mkdir $Nightly_dirname"); print "command:$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 44 |
return 1; |
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
sub Process { |
|---|
| 48 |
my ($parms, $Nightly_subdir) = @_; |
|---|
| 49 |
my $debug = $$parms{"debug"}; |
|---|
| 50 |
my $Nightly_dirname = $$parms{"Nightly_dirname"}; |
|---|
| 51 |
my $MirroringScripts_dir = $$parms{"MirroringScripts_dir"}; |
|---|
| 52 |
my $HTKdir = $$parms{"HTK_dir"}; |
|---|
| 53 |
print "creating: $Nightly_dirname\n"; |
|---|
| 54 |
$command = ("mkdir -p $Nightly_dirname/$Nightly_subdir $Nightly_dirname/$Nightly_subdir/etc"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 55 |
$command = ("cp $MirroringScripts_dir/LICENSE $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 56 |
$command = ("cp $MirroringScripts_dir/etc/GPL_License $Nightly_dirname/$Nightly_subdir/etc"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 57 |
$command = ("cp $HTKdir/input_files/config $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 58 |
$command = ("cp $HTKdir/interim_files/dict $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 59 |
$command = ("cp $HTKdir/interim_files/hmm15/hmmdefs $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 60 |
$command = ("cp $HTKdir/interim_files/hmm15/macros $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 61 |
$command = ("cp $HTKdir/interim_files/stats $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 62 |
$command = ("cp $HTKdir/interim_files/tiedlist $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 63 |
$command = ("cp $HTKdir/input_files/wav_config $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 64 |
$command = ("cp $HTKdir/interim_files/master_prompts $Nightly_dirname/$Nightly_subdir"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; |
|---|
| 65 |
return 1; |
|---|
| 66 |
} |
|---|
| 67 |
1; |
|---|