int sbcl_bin_expand(struct install_options* param) { cond_printf(1,"sbcl_bin_expand\n"); char* argv[6]={"","-xf",NULL,"-C",NULL,NULL}; char* archive=download_archive_name(param); char* dist_path=param->expand_path; char* home=configdir(); printf("Extracting %s to %s\n",archive,dist_path); delete_directory(dist_path,1); ensure_directories_exist(dist_path); argv[2]=cat(home,"archives",SLASH,archive,NULL); argv[4]=cat(home,"src",SLASH,NULL); return !cmd_tar(array_stringlist(5,argv),NULL); }
int download(struct install_options* param) { char* home=configdir(); char* url=install_impl->uri; char* archive_name=download_archive_name(param); char* impl_archive=cat(home,"archives",SLASH,archive_name,NULL); if(!file_exist_p(impl_archive) || get_opt("download.force",1)) { printf("Downloading %s\n",url); /*TBD proxy support... etc*/ if(url) { ensure_directories_exist(impl_archive); int status = download_simple(url,impl_archive,0); if(status) { printf("Download Failed with status %d. See download_simple in src/download.c\n", status); return 0; /* fail */ } s(url); } } else printf("Skip downloading %s\n",url); s(impl_archive),s(home); return 1; }