chiark / gitweb /
Fix up --same --upload thing to only apply to --same
[ypp-sc-tools.db-live.git] / pctb / convert.c
index 61901a5924854c967d9fc981a63406d6af89f66d..f3b87fea193de43d825417e706ec0ecad1175404 100644 (file)
@@ -124,6 +124,8 @@ void fetch_with_rsync(const char *stem) {
     const char *src= getenv("YPPSC_PCTB_DICT_UPDATE");
     char *remote= masprintf("%s/master-%s.txt", src, stem);
     char *local= masprintf("#master-%s#.txt", stem);
+    if (DEBUGP(rsync))
+      fprintf(stderr,"executing rsync to fetch %s to %s\n",remote,local);
     execlp(rsync, "rsync",
           DEBUGP(rsync) ? "-vLt" : "-Lt",
           "--",remote,local,(char*)0);
@@ -295,6 +297,8 @@ int main(int argc, char **argv) {
     progress_log("OK for you to move the mouse now.");
   }
   if (o_mode & mf_readscreenshot) {
+    if ((o_flags & ff_upload) && !(o_flags & ff_testservers))
+      badusage("must not reuse screenshots for upload to live PCTB database");
     open_screenshot_file("r");
     if (o_flags & ff_singlepage) read_one_screenshot();
     else read_screenshots();