$ SAY := WRITE SYS$OUTPUT $ SAY "!======================================================================== $ SAY "! $ SAY "! Name : COPY_TRICS $ SAY "! $ SAY "! Purpose : Selctively copy all source files to another directory, $ SAY "! possibly to a different node $ SAY "! (use $ SITE PWD to define the logical DZERO::). $ SAY "! System files are not copied. $ SAY "! +-----------------------------------------------------------+ $ SAY "! | To build system after the transfer is finished: | $ SAY "! | 1) check the SITE_DEPENDENT.CST file for D0/MSU | $ SAY "! | 2) check the TRICS_Vmn.DAT file for boot method, | $ SAY "! | node name/number | $ SAY "! | also check system pool size | $ SAY "! | 3) run $ MMS on the [.ITC] sub-directory | $ SAY "! | 4) run $ MMS on the main directory | $ SAY "! | (MMS tends to crash for unknown reasons: redo MMS/SKIP) | $ SAY "! | note: use $ MMS/SKIP/MACRO=(optimize=yes) to use optimizer| $ SAY "! +-----------------------------------------------------------+ $ SAY "! Arguments : P1 [optional] Source directory for Trics files $ SAY "! default: default directory $ SAY "! P2 [optional] Target directory $ SAY "! the command file can ask for it when missing $ SAY "! also P1 = DIFF, normal P1&P2 read from P2&P3 $ SAY "! $ SAY "! Created 3-NOV-1993 Philippe Laurens - MSU L1 Trigger $ SAY "! Updated 8-FEB-1994 Philippe Laurens - MSU L1 Trigger $ SAY "! Now can run difference instead of copy. $ SAY "! Use P1 = DIFF, normal P1&P2 read from P2&P3 $ SAY "! Updated 7-JUL-1994 Philippe Laurens - MSU L1 Trigger $ SAY "! Now can copy all files too $ SAY "! Use P1 = ALL, normal P1&P2 read from P2&P3 $ SAY "! Updated 27-JUL-1994 Philippe Laurens - MSU L1 Trigger $ SAY "! Allow ALL/SINCE=today (or any COPY qualifier) $ SAY "! $ SAY "!======================================================================== $ ON ERROR THEN $ GOTO EXIT $ ON CONTROL_Y THEN $ GOTO EXIT $ $ Copy_Files = "Selective" $ DCL_command = "COPY/NOLOG " $ src_dir = P1 $ tgt_dir = P2 $ $ IF ( P1 .EQS. "DIFF" ) $ THEN $ DCL_command = "PIPE DIFF " $ src_dir = P2 $ tgt_dir = P3 $ ENDIF $ $ IF ( F$EXTRACT(0,3,P1) .EQS. "ALL" ) $ THEN $ Copy_Files = "All" $ DCL_command = "COPY/NOLOG " + F$EXTRACT(3,255,P1) $ src_dir = P2 $ tgt_dir = P3 $ ENDIF $ $! check source directory argument $ IF ( src_dir .EQS. "" ) THEN src_dir = "[]" $ IF ( F$SEARCH("''src_dir'*.*") .EQS. "" ) THEN GOTO error_src_dir $ SAY " Source Directory is ''src_dir'" $ $! check target directory argument $ IF ( tgt_dir .EQS. "" ) THEN INQUIRE tgt_dir " Target Directory " $ IF ( tgt_dir .EQS. "" ) THEN GOTO error_tgt_dir $ $ target_ITC_dir = F$SEARCH("''tgt_dir'ITC.DIR") $ IF ( target_ITC_dir .EQS. "" ) THEN GOTO error_tgt_dir $ $ target_node = f$extract(0,f$locate("::",tgt_dir),tgt_dir) $ IF ( target_node .EQS. tgt_dir ) THEN target_node = "" $ IF ( target_node .NES. "" ) THEN target_node = target_node + "::" $ tgt_dir = target_node - + F$PARSE(target_ITC_dir,,,"DEVICE") - + F$PARSE(target_ITC_dir,,,"DIRECTORY") $ SAY " Target Directory is ''tgt_dir'" $ $! subdirectories needed $ src_dir_ITC = "''src_dir'" - "]" + ".ITC]" $ src_dir_ITC_eln = "''src_dir'" - "]" + ".ITC.ELN]" $ src_dir_ITC_inc = "''src_dir'" - "]" + ".ITC.INC]" $ $ tgt_dir_ITC = "''tgt_dir'" - "]" + ".ITC]" $ tgt_dir_ITC_eln = "''tgt_dir'" - "]" + ".ITC.ELN]" $ tgt_dir_ITC_inc = "''tgt_dir'" - "]" + ".ITC.INC]" $ $! check existence of correct directory structure $ IF ( F$SEARCH("''tgt_dir_ITC'ELN.DIR") .EQS. "" ) THEN GOTO error_tgt_dir $ IF ( F$SEARCH("''tgt_dir_ITC'INC.DIR") .EQS. "" ) THEN GOTO error_tgt_dir $ $ IF ( copy_files .EQS. "Selective" ) $ THEN $! Selectively copy all source files $! --------------------------------- $ SAY " Processing maintenance command files" $ 'DCL_command' 'src_dir'COPY_TRICS*.COM 'tgt_dir' $ 'DCL_command' 'src_dir'CHANGE_VERSION*.COM 'tgt_dir' $ $ SAY " Processing Source Code files" $ 'DCL_command' 'src_dir'TRICS*.PAS 'tgt_dir' $ 'DCL_command' 'src_dir'UNLOCK_SHA.PAS 'tgt_dir' $ 'DCL_command' 'src_dir'LOG_SERVER.PAS 'tgt_dir' $ 'DCL_command' 'src_dir'MAIL_SERVER.PAS 'tgt_dir' $ 'DCL_command' 'src_dir'MPOOL_SERVER.PAS 'tgt_dir' $ 'DCL_command' 'src_dir'INITIALIZE_TIME.PAS 'tgt_dir' $ 'DCL_command' 'src_dir'MOD%%%_*.PAS 'tgt_dir' $ 'DCL_command' 'src_dir'OPEN_3.FOR 'tgt_dir' $ 'DCL_command' 'src_dir'D0OPEN.FOR 'tgt_dir' $ 'DCL_command' 'src_dir'SITE_DEPENDENT.* 'tgt_dir' $ 'DCL_command' 'src_dir'*.TYP 'tgt_dir' $ 'DCL_command' 'src_dir'LSMLIB.EXT 'tgt_dir' $ 'DCL_command' 'src_dir'UNRESOLVED*.FOR 'tgt_dir' $ $ SAY " Processing ZRL files" $ 'DCL_command' 'src_dir'DUAL*.MAC 'tgt_dir' $ $ SAY " Processing system building files" $ 'DCL_command' 'src_dir'DESCRIP.MMS 'tgt_dir' $ 'DCL_command' 'src_dir'*_LINK.OPT 'tgt_dir' $ 'DCL_command' 'src_dir'TRICS*.DAT* 'tgt_dir' $ $ SAY " Processing matching Decnet Object COM files" $ 'DCL_command' 'src_dir'MAIL_SERVER.COM 'tgt_dir' $ 'DCL_command' 'src_dir'TELL_TIME.COM 'tgt_dir' $ $ SAY " Processing matching TRGMON Code" $ 'DCL_command' 'src_dir'FILL_MONIT_POOL.FOR 'tgt_dir' $ 'DCL_command' 'src_dir'LV1_MPOOL_RAW.INC 'tgt_dir' $ $ SAY " Processing ITC files " $ IF ( F$SEARCH("''tgt_dir_ITC'ELN.DIR") .EQS. "" ) THEN GOTO error_tgt_dir $ IF ( F$SEARCH("''tgt_dir_ITC'INC.DIR") .EQS. "" ) THEN GOTO error_tgt_dir $ 'DCL_command' 'src_dir_ITC'DESCRIP.MMS 'tgt_dir_ITC' $ 'DCL_command' 'src_dir_ITC_ELN'*.EPAS 'tgt_dir_ITC_ELN' $ 'DCL_command' 'src_dir_ITC_ELN'*.MAR 'tgt_dir_ITC_ELN' $ 'DCL_command' 'src_dir_ITC_ELN'*.MSG 'tgt_dir_ITC_ELN' $ 'DCL_command' 'src_dir_ITC_INC'*.INC 'tgt_dir_ITC_INC' $ $ ENDIF $ $ IF ( copy_files .EQS. "All" ) $ THEN $! copy all files in directory $! --------------------------- $ SAY " Processing main directory" $ 'DCL_command' 'src_dir'*.* 'tgt_dir' $ $ SAY " Processing ITC files " $ IF ( F$SEARCH("''tgt_dir_ITC'ELN.DIR") .EQS. "" ) THEN GOTO error_tgt_dir $ IF ( F$SEARCH("''tgt_dir_ITC'INC.DIR") .EQS. "" ) THEN GOTO error_tgt_dir $ 'DCL_command' 'src_dir_ITC'*.* 'tgt_dir_ITC' $ 'DCL_command' 'src_dir_ITC_ELN'*.* 'tgt_dir_ITC_ELN' $ 'DCL_command' 'src_dir_ITC_INC'*.* 'tgt_dir_ITC_INC' $ $ ENDIF $ $ GOTO exit $error_src_dir: $ SAY "problem with source directory argument /''src_dir'/" $ GOTO exit $error_tgt_dir: $ SAY "problem with target directory argument /''tgt_dir'/" $ SAY " It should have the correct sub-directory structure" $ SAY " It should have the correct sub-directory structure" $ SAY " ''tgt_dir_ITC' $ SAY " ''tgt_dir_ITC_eln' $ SAY " ''tgt_dir_ITC_inc' $ GOTO exit $EXIT: $ EXIT