* Sebastian Hammer, Adam Dickmeiss
*
* $Log: trav.c,v $
- * Revision 1.11 1995-11-22 17:19:19 adam
+ * Revision 1.12 1995-11-24 11:31:37 adam
+ * Commands add & del read filenames from stdin if source directory is
+ * empty.
+ * Match criteria supports 'constant' strings.
+ *
+ * Revision 1.11 1995/11/22 17:19:19 adam
* Record management uses the bfile system.
*
* Revision 1.10 1995/11/21 15:01:16 adam
}
+static void stdinExtractR (int deleteFlag, struct recordGroup *rGroup)
+{
+ char tmppath[256];
+
+ while (scanf ("%s", tmppath) == 1)
+ fileExtract (NULL, tmppath, rGroup, deleteFlag);
+}
+
static void repositoryUpdateR (struct dirs_info *di, struct dirs_entry *dst,
const char *base, char *src,
struct recordGroup *rGroup)
assert (rGroup->path);
strcpy (src, rGroup->path);
- repositoryExtractR (1, src, rGroup);
+ if (*src == '\0')
+ stdinExtractR (1, rGroup);
+ else
+ repositoryExtractR (1, src, rGroup);
}
void repositoryAdd (struct recordGroup *rGroup)
assert (rGroup->path);
strcpy (src, rGroup->path);
- repositoryExtractR (0, src, rGroup);
+ if (*src == '\0')
+ stdinExtractR (0, rGroup);
+ else
+ repositoryExtractR (0, src, rGroup);
}