Пример #1
0
int sbcl_version_bin(struct install_options* param) {
  char* home=configdir();
  char* platforms_html=cat(home,"tmp",SLASH,"sbcl-bin.html",NULL);
  cond_printf(1,"sbcl_version_bin\n");
  ensure_directories_exist(platforms_html);
  param->version_not_specified=param->version?0:1;
  if(param->version_not_specified) {
    int ret;
    printf("No SBCL version specified. Downloading platform-table.html to see the available versions...\n");
    char* uri=get_opt("sbcl-bin-version-uri",0);
    ret=download_simple(uri?uri:PLATFORM_HTML_URI,platforms_html,0);
    if(ret!=0) {
      printf("Something wrong! Check the connection or sbcl.org is down. Download failed (Code=%d), tring the backup URL.\n",ret);
      ret=download_simple(PLATFORM_HTML_BACKUP_URI,platforms_html,0);
    }
    if(ret!=0) {
      printf("Download failed (Code=%d)\n",ret);
      return 0;
    }
    sbcl_bin_check_file(platforms_html);
    param->version=sbcl_bin(platforms_html,param->version_not_specified++);
  }else
    param->version=q(param->version);
  printf("Installing sbcl-bin/%s...\n",param->version);
  param->arch_in_archive_name=1;

  s(platforms_html),s(home);
  return 1;
}
Пример #2
0
int main(int argc,char** argv) {
  verbose=1;
  printf("version is %s\n",sbcl_bin(argv[1]));
}