OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [mkinstalldirs] - Blame information for rev 601

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#!/bin/sh
2
# Make directory hierarchy.
3
# Written by Noah Friedman 
4
# Public domain.
5
#
6
#  $Id: mkinstalldirs,v 1.2 2001-09-27 11:59:04 chris Exp $
7
#
8
 
9
defaultIFS='
10
'
11
IFS="${IFS-${defaultIFS}}"
12
 
13
errstatus=0
14
 
15
for file in ${1+"$@"} ; do
16
   oIFS="${IFS}"
17
   # Some sh's can't handle IFS=/ for some reason.
18
   IFS='%'
19
   set - `echo ${file} | sed -e 's@/@%@g' -e 's@^%@/@'`
20
   IFS="${oIFS}"
21
 
22
   pathcomp=''
23
 
24
   for d in ${1+"$@"} ; do
25
     pathcomp="${pathcomp}${d}"
26
 
27
     if test ! -d "${pathcomp}"; then
28
        echo "mkdir $pathcomp" 1>&2
29
        mkdir "${pathcomp}" || errstatus=$?
30
     fi
31
 
32
     pathcomp="${pathcomp}/"
33
   done
34
done
35
 
36
exit $errstatus
37
 
38
# eof

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.