<!ENTITY % idcommon SYSTEM "common/common.ent">
%idcommon;
]>
-<!-- $Id: pazpar2.xml,v 1.11 2007-07-16 09:10:05 adam Exp $ -->
+<!-- $Id: pazpar2.xml,v 1.12 2007-09-10 08:42:48 adam Exp $ -->
<refentry id="pazpar2">
<refentryinfo>
<productname>Pazpar2</productname>
<arg choice="opt"><option>-p <replaceable>pidfile</replaceable></option></arg>
<arg choice="opt"><option>-t <replaceable>path</replaceable></option></arg>
<arg choice="opt"><option>-u <replaceable>uid</replaceable></option></arg>
+ <arg choice="opt"><option>-V</option></arg>
<arg choice="opt"><option>-X</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
</varlistentry>
<varlistentry>
+ <term><option>-V</option></term>
+ <listitem>
+ <para>
+ Shows Pazpar2 version and versions of some of the components that it
+ is using (ICU and YAZ). Pazpar2 will not exit immediately after
+ displaying the version information (no daemon started).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-X</option></term>
<listitem>
<para>
-/* $Id: pazpar2.c,v 1.92 2007-07-10 09:19:32 adam Exp $
+/* $Id: pazpar2.c,v 1.93 2007-09-10 08:42:48 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
}
+static void show_version(void)
+{
+ char yaz_version_str[80];
+ printf("Pazpar2 " VERSION "\n");
+
+ yaz_version(yaz_version_str, 0);
+
+ printf("Configuration:");
+#if HAVE_ICU
+ printf(" icu:?");
+#endif
+ printf(" yaz:%s", yaz_version_str);
+ printf("\n");
+ exit(0);
+}
+
int main(int argc, char **argv)
{
int daemon = 0;
yaz_log_init_prefix("pazpar2");
- while ((ret = options("dDf:h:l:p:t:u:X", argv, argc, &arg)) != -2)
+ while ((ret = options("dDf:h:l:p:t:u:VX", argv, argc, &arg)) != -2)
{
switch (ret)
{
case 'u':
uid = arg;
break;
+ case 'V':
+ show_version();
case 'X':
global_parameters.debug_mode = 1;
break;
" -p pidfile PID file\n"
" -t settings\n"
" -u uid\n"
+ " -V show version\n"
" -X debug mode\n"
);
exit(1);