jpayne@68: #! /bin/sh jpayne@68: # Copyright (C) 2016 and later: Unicode, Inc. and others. jpayne@68: # License & terms of use: http://www.unicode.org/copyright.html jpayne@68: # ******************************************************************** jpayne@68: # * COPYRIGHT: jpayne@68: # * Copyright (c) 2002-2004, International Business Machines Corporation and jpayne@68: # * others. All Rights Reserved. jpayne@68: # ******************************************************************** jpayne@68: # mkinstalldirs --- make directory hierarchy jpayne@68: # Author: Noah Friedman jpayne@68: # Created: 1993-05-16 jpayne@68: # Public domain jpayne@68: jpayne@68: errstatus=0 jpayne@68: jpayne@68: for file jpayne@68: do jpayne@68: set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` jpayne@68: shift jpayne@68: jpayne@68: pathcomp= jpayne@68: for d jpayne@68: do jpayne@68: pathcomp="$pathcomp$d" jpayne@68: case "$pathcomp" in jpayne@68: -* ) pathcomp=./$pathcomp ;; jpayne@68: esac jpayne@68: jpayne@68: if test ! -d "$pathcomp"; then jpayne@68: echo "mkdir $pathcomp" jpayne@68: jpayne@68: mkdir "$pathcomp" || lasterr=$? jpayne@68: jpayne@68: if test ! -d "$pathcomp"; then jpayne@68: errstatus=$lasterr jpayne@68: fi jpayne@68: fi jpayne@68: jpayne@68: pathcomp="$pathcomp/" jpayne@68: done jpayne@68: done jpayne@68: jpayne@68: exit $errstatus jpayne@68: jpayne@68: # mkinstalldirs ends here