1DOLLY 72PACKAGE transfer3REQUIRES HOST runtime@04REQUIRES HOST download@05REQUIRES HOST upload@06789FROM /v0.1.7/Dollyfile-system-build d1bb50136de0dadf12e3e2af2266c5102e9ab15769e9f607807c44d46323f3a110USE /v0.1.7/Dollyfile-libdolly-download bf7303fc0e340e9d2049ae295205598ee876e0af0cbfe160583c055f2f58843911USE /v0.1.7/Dollyfile-libdolly-upload 14f4545e2fb3a6c4440e435088caffb7261ee640d6650424b3547a94114deb6612REQUIRES HEADER libc13REQUIRES HEADER download14REQUIRES HEADER upload15REQUIRES TOOL cc16REQUIRES TOOL rm1718FILE /tmp/download/download.c192021 2223 24 int main(int argc, char **argv) {25 if (argc == 2 && strcmp(argv[1], "--help") == 0) {26 fputs("usage: download FILE\n", stdout);27 return 0;28 }29 if (argc != 2) {30 fputs("download: expected one file\n", stderr);31 return 2;32 }33 const int status = dolly_download_file(argv[1]);34 if (status != 0) {35 fprintf(stderr, "download: %s failed (%d)\n", argv[1], status);36 return 1;37 }38 printf("download: requested %s\n", argv[1]);39 return 0;40 }4142SLOP cc \43 /tmp/download/download.c \44 -o /bin/download4546EXPORTS TOOL download47SLOP download --help > /usr/share/man/cat1/download.14849FILE /tmp/upload/upload.c5051525354 int main(int argc, char **argv) {55 if (argc != 2 || strcmp(argv[1], "--help") == 0) {56 fprintf(argc == 2 ? stdout : stderr, "usage: upload DESTINATION\nChoose a file in the browser (up to %u MiB). Existing files are never replaced.\n",57 DOLLY_UPLOAD_MAX_SIZE >> 20);58 return argc == 2 ? 0 : 2;59 }60 puts("upload: choose a file in the browser, or cancel");61 fflush(stdout);62 const int result = dolly_upload_file(argv[1]);63 if (result < 0) { fprintf(stderr, "upload: %s\n", strerror((int)-result)); return 1; }64 printf("upload: saved %s\n", argv[1]);65 return 0;66 }67SLOP cc -O1 /tmp/upload/upload.c -o /bin/upload68EXPORTS TOOL upload69SLOP upload --help > /usr/share/man/cat1/upload.17071FILE /usr/share/man/cat1/download.172FILE /usr/share/man/cat1/upload.173SLOP rm -rf /tmp/download /tmp/upload74