URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [rtems/] [scripts/] [mkinstalldirs] - Diff between revs 208 and 1765
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 208 |
Rev 1765 |
#! /bin/sh
|
#! /bin/sh
|
# mkinstalldirs --- make directory hierarchy
|
# mkinstalldirs --- make directory hierarchy
|
# Author: Noah Friedman
|
# Author: Noah Friedman
|
# Created: 1993-05-16
|
# Created: 1993-05-16
|
# Public domain
|
# Public domain
|
|
|
# $Id: mkinstalldirs,v 1.2 2001-09-27 12:02:52 chris Exp $
|
# $Id: mkinstalldirs,v 1.2 2001-09-27 12:02:52 chris Exp $
|
|
|
errstatus=0
|
errstatus=0
|
|
|
for file
|
for file
|
do
|
do
|
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
shift
|
shift
|
|
|
pathcomp=
|
pathcomp=
|
for d
|
for d
|
do
|
do
|
pathcomp="$pathcomp$d"
|
pathcomp="$pathcomp$d"
|
case "$pathcomp" in
|
case "$pathcomp" in
|
-* ) pathcomp=./$pathcomp ;;
|
-* ) pathcomp=./$pathcomp ;;
|
esac
|
esac
|
|
|
if test ! -d "$pathcomp"; then
|
if test ! -d "$pathcomp"; then
|
echo "mkdir $pathcomp"
|
echo "mkdir $pathcomp"
|
|
|
mkdir "$pathcomp" || lasterr=$?
|
mkdir "$pathcomp" || lasterr=$?
|
|
|
if test ! -d "$pathcomp"; then
|
if test ! -d "$pathcomp"; then
|
errstatus=$lasterr
|
errstatus=$lasterr
|
fi
|
fi
|
fi
|
fi
|
|
|
pathcomp="$pathcomp/"
|
pathcomp="$pathcomp/"
|
done
|
done
|
done
|
done
|
|
|
exit $errstatus
|
exit $errstatus
|
|
|
# mkinstalldirs ends here
|
# mkinstalldirs ends here
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.