1DOLLY 72PACKAGE transfer3REQUIRES HOST runtime@04REQUIRES HOST download@05REQUIRES HOST upload@06789FROM /v0.1.6/Dollyfile-system-build 2b3dacf451ba777ad3724b819014df4e705b024aa73c51c60125d8b5e45c9b5710USE /v0.1.6/Dollyfile-libdolly-download 95c2cc70e0449df33d18e0315becc264b3166b75e93ca0b8e998cb99d26a8a8911USE /v0.1.6/Dollyfile-libdolly-upload 1fe7e77466c74fd2d961fda7b2fefd33065e6a638e12e07dedf954894832fcd312REQUIRES 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