Changeset 15169 for gsdl/trunk


Ignore:
Timestamp:
2008-04-02T18:19:37+13:00 (16 years ago)
Author:
ak19
Message:

Most important change: need this script to print out some message to STDOUT (or STDERR) when it's successful, else GShell.java's runRemote() sets status to CANCELLED if there's no output (even when execution went well).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/replace_srcdoc_with_html.pl

    r15153 r15169  
    152152    #return 0; # error code 0 for false <- NO, needs to die, not return!
    153153    }
    154     #else
     154    #else:
    155155
    156156    # now, find out what to move:
     
    186186    die "File $new_file already exists. Deleting generated file.\n";
    187187    }
    188    
     188
    189189    # Now we know we have no file name collisions
    190190    # use util to move it all to the import directory where the original file is located
    191     #&util::mv($output_filename, &util::filename_cat($import_dir, $tmp_name.$ext)); # doesn't work
    192     #&util::mv($output_filename, $import_dir); # doesn't work
     191       #&util::mv($output_filename, &util::filename_cat($import_dir, $tmp_name.$ext)); # doesn't work
     192       #&util::mv($output_filename, $import_dir); # doesn't work
    193193    &util::cp($output_filename, $import_dir);
    194194    &util::rm($output_filename);
    195195    if(-e $assoc_folder) { # move any associated folders too
    196196    #print STDERR "****Folder for associated files is $assoc_folder\n";
    197     #&util::mv($assoc_folder, $import_dir); # doesn't work for me
     197        #&util::mv($assoc_folder, $import_dir); # doesn't work for me
    198198    &util::cp_r($assoc_folder, $import_dir);
    199199    &util::rm_r($assoc_folder);
    200     }
     200    }   
    201201
    202202    # Now we can remove the source doc permanently (there are no assocdirs for source doc)
    203203    &util::rm($filename);
    204    
     204
     205    # need this output statement here, as GShell.java's runRemote() sets status to CANCELLED
     206    # if there is no output! (Therefore, it only had this adverse affect when running GSDL remotely)
     207    print STDOUT "success\n";
    205208}
    206209&main(@ARGV);
Note: See TracChangeset for help on using the changeset viewer.