$! PATCH_WITH_DIFF.COM $! 26-SEP-1997, David Mathog $! $! This routine finds all files ending in .diff $! and does EDIT/SUM file/update=(whatever.diff) $! $ ws := write sys$output $ if(f$type(edit) .nes. "") $ then $ ws "you must delete the EDIT symbol before you run this" $ exit $ endif $ ws "beginning search for files to modify" $ hereis = f$environment("DEFAULT") - "]" $ top: $ ufile = f$search("[...]*.diff",1) $ if(ufile .eqs. "")then goto alldone $! $! ok, found one, strip off the .diff and version portions and find the $! name of the file to update $! $ tail = f$parse(ufile,,,"version") $ pattern = ufile - ".DIFF" - tail + ".*" $ top2: $ mfile = f$search(pattern,2) $ if(mfile .eqs. ufile)then goto top2 $ if(mfile .eqs. "")then goto nomodify $ mfile = f$element(0,";",mfile) ! remove the version number $ smfile = "[" + mfile - hereis $ sufile = "[" + ufile - hereis $ ws "Updating ''smfile' with ''sufile'" $ edit/sum 'mfile' /update='sufile' /output='mfile' $ goto top $ nomodify: $ ws "Could not find a file to modify for ''ufile'" $ goto top $! $ alldone: $ ws "Updates completed"