#!/bin/sh
# Make directory hierarchy. 
# Written by Noah Friedman <friedman@prep.ai.mit.edu>
# Public domain.

for file in ${1+"$@"} ; do 
   oIFS="${IFS}"; IFS='/'; set - ${file}; IFS="${oIFS}"
   test ".${1}" = "." && shift

   pathcomp=''

   while test $# -ne 0 ; do
     pathcomp="${pathcomp}/${1}"
     shift

     if test ! -d "${pathcomp}"; then
        echo "mkdir $pathcomp" 1>&2
        mkdir "${pathcomp}"
     fi
   done
done

# eof
