#!/bin/sh # # Copyright (C) 1989, 1990, Digital Equipment Corporation # All rights reserved. # See the file COPYRIGHT for a full description. # # Last Modified On Tue Oct 19 14:11:58 PDT 1993 By kalsow # Modified On Thu Apr 8 13:19:25 PDT 1993 By muller # # "m3mkdir X/Y/Z" will build directory X/Y/Z and # any missing intermediate directories. # # already done? if [ -d $1 ]; then exit 0; fi # build a list of all the missing intermediate directories dirs="" cur_dir=$1 last_dir="@" while [ $last_dir != $cur_dir -a ! -d $cur_dir ]; do dirs="$cur_dir $dirs" last_dir=$cur_dir cur_dir=`dirname $cur_dir` done # finally, build the directories for f in $dirs ; do echo mkdir $f mkdir $f || exit 1 done exit 0