home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / CNEWS / _CNEWS.TAR / usr / lib / newsbin / relay / doexplode < prev    next >
Encoding:
Text File  |  1994-09-02  |  686 b   |  28 lines

  1. #! /bin/sh
  2. # explode master batch files into normal batch files
  3.  
  4. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  5. . ${NEWSCONFIG-/var/lib/news/bin/config}
  6.  
  7. PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  8. umask $NEWSUMASK
  9.  
  10. cd $NEWSARTS
  11. for f in out.master/[0-9]*
  12. do
  13.     if [ ! -f $f ] ; then continue; fi # <- this line added (bash fix)
  14. # These 3 commented out to fix the bash incompatibility:
  15. #    case "$f" in
  16. #    "out.master/[0-9]*")    break ;;    # no work
  17. #    esac
  18.     work=$f.tmp
  19.     export f work
  20.     # lock against relaynews for the mv and
  21.     # batchers for explode.
  22.     SHELL=/bin/sh $NEWSBIN/maint/locknews <<'!'
  23.         mv $f $work    # move out the way of relaynews
  24.         explode $work
  25.         rm -f $work
  26. !
  27. done
  28.