Changeset 9895


Ignore:
Timestamp:
2005-05-17T13:16:16+12:00 (19 years ago)
Author:
davidb
Message:

Modifications so information collated in WriteCDImagePrompt is transmitted
correctly to "launch" script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/shell/GShell.java

    r9888 r9895  
    326326        }
    327327       
    328         launch += "&";
    329328       
    330329        if(arg.startsWith(StaticStrings.MINUS_CHARACTER)) {
    331330            String name = arg.substring(1);
    332             launch = launch + name + "=";
     331            launch = launch + "&" + name + "=";
    333332            if (i+1<args.length-1) {
    334333            if (!args[i+1].startsWith(StaticStrings.MINUS_CHARACTER)) {
     
    350349
    351350        if (cols_concat!=null) {
    352         launch = launch + "c=" + cols_concat;
     351        launch = launch + "&c=" + cols_concat;
    353352        }
    354353
     
    635634
    636635            // export directory named stored as -cdname argument
    637             String cd_name = "exported_collections";
     636            String cd_dir = "exported_collections";
    638637            for (int i=0; i<args.length-1; i++) {
    639             if (args[i] == "-cdname") {
    640                 cd_name = "exported_" + args[i+1];
     638            if (args[i] == "-cddir") {
     639                cd_dir = args[i+1];
    641640                break;
    642641            }
    643642            }
    644643
    645             String full_cd_dir = tmp_dir + cd_name;
    646 
    647             Utility.delete(full_cd_dir); // remove current cd-rom dir, if it exists
    648             GathererApplet.download_url_zip("/tmp",cd_name,this,"","");
    649 
    650             Utility.unzip(Configuration.gsdl_path, "tmp");
     644            // String user_cd_dir = cd_dir;
     645            String user_tmp_dir = "/tmp";
     646            String username = System.getProperty("user.name");
     647            if ((username != null) && (username != "")) {
     648            // user_cd_dir = username + File.separator + cd_dir;
     649            user_tmp_dir = user_tmp_dir + File.separator + username;
     650            }
     651
     652            String full_local_cd_dir = tmp_dir + cd_dir;
     653
     654            Utility.delete(full_local_cd_dir); // remove current cd-rom dir, if it exists
     655            GathererApplet.download_url_zip(user_tmp_dir,cd_dir,this,"","");
     656
     657            Utility.unzip(Configuration.gsdl_path, user_tmp_dir.substring(1));
    651658
    652659            if (progress!=null) {
Note: See TracChangeset for help on using the changeset viewer.