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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [mkinstalldirs] - Diff between revs 30 and 173

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 30 Rev 173
?rev1line?
?rev2line?
 
#!/bin/sh
 
# Make directory hierarchy.
 
# Written by Noah Friedman 
 
# Public domain.
 
#
 
#  $Id: mkinstalldirs,v 1.2 2001-09-27 11:59:04 chris Exp $
 
#
 
 
 
defaultIFS='
 
'
 
IFS="${IFS-${defaultIFS}}"
 
 
 
errstatus=0
 
 
 
for file in ${1+"$@"} ; do
 
   oIFS="${IFS}"
 
   # Some sh's can't handle IFS=/ for some reason.
 
   IFS='%'
 
   set - `echo ${file} | sed -e 's@/@%@g' -e 's@^%@/@'`
 
   IFS="${oIFS}"
 
 
 
   pathcomp=''
 
 
 
   for d in ${1+"$@"} ; do
 
     pathcomp="${pathcomp}${d}"
 
 
 
     if test ! -d "${pathcomp}"; then
 
        echo "mkdir $pathcomp" 1>&2
 
        mkdir "${pathcomp}" || errstatus=$?
 
     fi
 
 
 
     pathcomp="${pathcomp}/"
 
   done
 
done
 
 
 
exit $errstatus
 
 
 
# eof

powered by: WebSVN 2.1.0

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