X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmain.c;h=91e35566a3a3187ced627915d5be3871c789a015;hb=ad79299e8f93b8af87e29a8d95d41eb1071284ec;hp=bedca40b5297bf2fcaccb4a3ba074b7d00335110;hpb=b91ce3324c28145911b703dfe4e4c0ddb12d6532;p=idzebra-moved-to-github.git diff --git a/index/main.c b/index/main.c index bedca40..91e3556 100644 --- a/index/main.c +++ b/index/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.94 2002-08-05 14:08:08 adam Exp $ +/* $Id: main.c,v 1.96 2002-09-03 11:44:54 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -84,6 +84,7 @@ int main (int argc, char **argv) rGroupDef.databaseNamePath = 0; rGroupDef.explainDatabase = 0; rGroupDef.fileVerboseLimit = 100000; + rGroupDef.followLinks = -1; prog = *argv; if (argc < 2) @@ -105,12 +106,13 @@ int main (int argc, char **argv) " -s Show analysis on stdout, but do no work.\n" " -v Set logging to .\n" " -l Write log to .\n" + " -L Don't follow symbolic links.\n" " -f Display information for the first records.\n" " -V Show version.\n", *argv ); exit (1); } - while ((ret = options ("sVt:c:g:d:m:v:nf:l:" + while ((ret = options ("sVt:c:g:d:m:v:nf:l:L" , argv, argc, &arg)) != -2) { if (ret == 0) @@ -119,11 +121,15 @@ int main (int argc, char **argv) { if (!zs) { + const char *config = configName ? configName : "zebra.cfg"; logf (LOG_LOG, "Zebra version %s %s", ZEBRAVER, ZEBRADATE); - zs = zebra_start (configName ? configName : "zebra.cfg"); + zs = zebra_start (config); if (!zs) + { + yaz_log (LOG_FATAL, "Cannot read config %s", config); exit (1); + } zh = zebra_open (zs); if (disableCommit) zebra_shadow_enable (zh, 0); @@ -242,6 +248,8 @@ int main (int argc, char **argv) rGroupDef.recordType = arg; else if (ret == 'n') disableCommit = 1; + else if (ret == 'L') + rGroupDef.followLinks = 0; else logf (LOG_WARN, "unknown option '-%s'", arg); }