X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmain.c;h=51b475e8a575fe900e6d80613d1426c4b44318c9;hb=869b11178c518bf4b8c81e1cb5daca8cfc8a17c6;hp=704dc92787c04294f5ac10cf51513d4d573d871e;hpb=9cb291694ad137f4e72c8c31203ced6ca3741f2c;p=idzebra-moved-to-github.git diff --git a/index/main.c b/index/main.c index 704dc92..51b475e 100644 --- a/index/main.c +++ b/index/main.c @@ -4,7 +4,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: main.c,v $ - * Revision 1.33 1996-02-06 17:11:18 adam + * Revision 1.34 1996-02-07 14:06:39 adam + * Better progress report during register merge. + * New command: clean - removes temporary shadow files. + * + * Revision 1.33 1996/02/06 17:11:18 adam * Minor changes. * * Revision 1.32 1996/02/01 20:50:04 adam @@ -170,6 +174,7 @@ int main (int argc, char **argv) " If is empty filenames are read from stdin.\n" " delete Delete index with files below .\n" " commit Commit changes\n" + " clean Clean shadow files\n" "Options:\n" " -t Index files as (grs or text).\n" " -c Read configuration file .\n" @@ -232,6 +237,19 @@ int main (int argc, char **argv) else logf (LOG_LOG, "Nothing to commit"); } + else if (!strcmp (arg, "clean")) + { + zebraIndexLock (0); + if (bf_commitExists ()) + { + zebraIndexLockMsg ("d"); + zebraIndexWait (0); + logf (LOG_LOG, "Commit clean"); + bf_commitClean (); + } + else + logf (LOG_LOG, "Nothing to clean"); + } else if (!strcmp (arg, "stat") || !strcmp (arg, "status")) { zebraIndexLock (0);