Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <fishandfrolick@gmail.com>2012-06-20 17:20:29 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2012-06-20 17:20:29 +0400
commit112b4c768d8a7ca9a3e718e5c5862a843da2a526 (patch)
tree0586048aad69211fa6185ad1f50607996ab82b35 /contrib
parente71f76a3e5099b95b5dff08510399f5df01a0f51 (diff)
use FindBin() to get directory of moses exec. Get ini file from command line, not hardcoded
Diffstat (limited to 'contrib')
-rw-r--r--contrib/web/bin/daemon.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/web/bin/daemon.pl b/contrib/web/bin/daemon.pl
index 8e6a08739..acb63bda7 100644
--- a/contrib/web/bin/daemon.pl
+++ b/contrib/web/bin/daemon.pl
@@ -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