- if (rep[rep_len-1] != '/')
- rep[rep_len] = '/';
- else
- --rep_len;
- while ((dent = readdir (dir)))
- {
- strcpy (rep +rep_len+1, dent->d_name);
- stat (rep, &fs);
- switch (fs.st_mode & S_IFMT)
- {
- case S_IFREG:
- file_extract (cmd, &fs, rep);
- break;
- case S_IFDIR:
- if (strcmp (dent->d_name, ".") && strcmp(dent->d_name, ".."))
- repository_extract_r (cmd, rep);
- break;
- }
- }
- closedir (dir);
-}
-
-void repository_update_r (int cmd, const char *rep, const char *with_rep)
-{
-
-}
-
-void repository_traverse (int cmd, const char *rep)
-{
- char rep_tmp1[2048];
- char rep_tmp2[2048];
-
- strcpy (rep_tmp1, rep);
- if (base_path)
- {
- strcpy (rep_tmp2, base_path);
- repository_update_r (cmd, rep_tmp1, rep_tmp2);
- }
- else
- repository_extract_r (cmd, rep_tmp1);
-}
-
-
-int main (int argc, char **argv)
-{
- int ret;
- int cmd = 0;
- char *arg;
- char *base_name;
-
- prog = *argv;
- while ((ret = options ("b:v:", argv, argc, &arg)) != -2)
+ while ((ret = options ("sVt:c:g:d:m:v:nf:l:L"
+ , argv, argc, &arg)) != -2)