# OSWload.def: Archives and Collects OSWatcher Files # $Id: OSWload.def,v 2.5 2012/01/03 13:34:43 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/OSWload.def,v 2.5 2012/01/03 13:34:43 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME OSWload - Archives and Collects OSWatcher Files =head1 DESCRIPTION =head2 osw - OSWatcher When available, this module archives OSWatcher files and collects the resulting zip file. =cut debug ' Inside LOAD module, gathering OSWatcher information' if isUnix() {report osw # Purge old reports and create the directory when needed call setAbbr('OSW') call purge('E','archive\.(htm|txt|zip)$',0,0,true) # Check if OSWatcher collection is disabled if getSetting('NO_OSW') return # Collect OSWatcher information if loadFile('/tmp/osw.hb') {var $zip = findCommand('zip') if $zip {var $tgt = concat(${CUR.PREFIX},'archive.zip') var $osw = catDir(getLines(0,0),'archive') var $cmd = concat($zip,' -Drj ',catCommand(${OUT.E},$tgt),' ',\ quote($osw,'x'),' >/dev/null 2>&1') call command($cmd) if !status() {write '---+ Caution' write 'This is a binary file which can be saved through the following \ link:%BR%[[extern/',$tgt,'][OSWatcher]]' toc '2:[[',getFile(),'][rda_report][OSWatcher]]' } } } } =begin credits =over 10 =item RDA 4.5: Bob Caldwell. =item RDA 4.6: Bob Caldwell. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut