home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 400-499 / ff473.lzh / CNewsSrc / cnews_src.lzh / relay / aux / mkpdir < prev    next >
Text File  |  1990-01-11  |  487b  |  24 lines

  1. #! /bin/sh
  2. # mkpdir dir ... - make directory and parents
  3.  
  4. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  5. . ${NEWSCONFIG-/usr/lib/news/bin/config}
  6. export NEWSCTL NEWSBIN NEWSARTS
  7. PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH    # must include this file's dir.
  8.  
  9. umask $NEWSUMASK
  10.  
  11. status=0
  12. for dir
  13. do
  14.     mkdir "$dir" 2>/dev/null
  15.     if test ! -d "$dir"; then
  16.         mkpdir "`echo $dir | sed 's;/[^/]*$;;'`"
  17.         mkdir "$dir"
  18.         if test ! -d "$dir"; then
  19.             status=1
  20.         fi
  21.     fi
  22. done
  23. exit $status
  24.