mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-19 23:27:46 +03:00
use FindBin() to get directory of moses exec. Get ini file from command line, not hardcoded
This commit is contained in:
parent
e71f76a3e5
commit
112b4c768d
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
use FindBin qw($Bin);
|
||||
use warnings;
|
||||
use strict;
|
||||
$|++;
|
||||
@ -27,12 +28,12 @@ use IPC::Open2;
|
||||
#------------------------------------------------------------------------------
|
||||
# constants, global vars, config
|
||||
|
||||
my $MOSES = '/local/herves/moses/moses-irst';
|
||||
my $MOSES_INI = '/local/herves/moses/fr-en/moses.ini.2';
|
||||
my $MOSES = "$Bin/../../../bin/moses";
|
||||
|
||||
die "usage: daemon.pl <hostname> <port>" unless (@ARGV == 2);
|
||||
die "usage: daemon.pl <hostname> <port> <ini>" unless (@ARGV == 3);
|
||||
my $LISTEN_HOST = shift;
|
||||
my $LISTEN_PORT = shift;
|
||||
my $MOSES_INI = shift;
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# main
|
||||
|
Loading…
Reference in New Issue
Block a user