]> git.saurik.com Git - apple/icu.git/blame - icuSources/mkinstalldirs
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / mkinstalldirs
CommitLineData
b75a7d8f 1#! /bin/sh
f3c0d7a5
A
2# Copyright (C) 2016 and later: Unicode, Inc. and others.
3# License & terms of use: http://www.unicode.org/copyright.html
b75a7d8f
A
4# ********************************************************************
5# * COPYRIGHT:
374ca955 6# * Copyright (c) 2002-2004, International Business Machines Corporation and
b75a7d8f
A
7# * others. All Rights Reserved.
8# ********************************************************************
9# mkinstalldirs --- make directory hierarchy
10# Author: Noah Friedman <friedman@prep.ai.mit.edu>
11# Created: 1993-05-16
12# Public domain
13
b75a7d8f
A
14errstatus=0
15
16for file
17do
18 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
19 shift
20
21 pathcomp=
22 for d
23 do
24 pathcomp="$pathcomp$d"
25 case "$pathcomp" in
26 -* ) pathcomp=./$pathcomp ;;
27 esac
28
29 if test ! -d "$pathcomp"; then
30 echo "mkdir $pathcomp"
31
32 mkdir "$pathcomp" || lasterr=$?
33
34 if test ! -d "$pathcomp"; then
35 errstatus=$lasterr
36 fi
37 fi
38
39 pathcomp="$pathcomp/"
40 done
41done
42
43exit $errstatus
44
45# mkinstalldirs ends here