+ if (CopyFile(fd, out) == false)
+ return false;
+ }
+ return true;
+}
+ /*}}}*/
+static bool ShowHelp(CommandLine &) /*{{{*/
+{
+ std::cout <<
+ _("Usage: apt-helper [options] command\n"
+ " apt-helper [options] cat-file file ...\n"
+ " apt-helper [options] download-file uri target-path\n"
+ "\n"
+ "apt-helper bundles a variety of commands for shell scripts to use\n"
+ "e.g. the same proxy configuration or acquire system as APT would.\n");
+ return true;
+}
+ /*}}}*/
+static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
+{
+ return {
+ {"download-file", &DoDownloadFile, _("download the given uri to the target-path")},
+ {"srv-lookup", &DoSrvLookup, _("lookup a SRV record (e.g. _http._tcp.ftp.debian.org)")},
+ {"cat-file", &DoCatFile, _("concatenate files, with automatic decompression")},
+ {"auto-detect-proxy", &DoAutoDetectProxy, _("detect proxy using apt.conf")},
+ {nullptr, nullptr, nullptr}
+ };
+}
+ /*}}}*/
+int main(int argc,const char *argv[]) /*{{{*/
+{