This repository has been archived on 2023-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
libpng/mkinstalldirs

41 lines
722 B
Plaintext
Raw Normal View History

2004-12-03 00:14:51 +00:00
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
2006-03-02 13:23:18 +00:00
# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
2004-12-03 00:14:51 +00:00
2006-03-02 13:23:18 +00:00
errstatus=0
2004-12-03 00:14:51 +00:00
for file
do
2006-03-02 13:23:18 +00:00
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
2004-12-03 00:14:51 +00:00
2006-03-02 13:23:18 +00:00
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
2004-12-03 00:14:51 +00:00
2006-03-02 13:23:18 +00:00
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
2004-12-03 00:14:51 +00:00
2006-03-02 13:23:18 +00:00
mkdir "$pathcomp" || lasterr=$?
2004-12-03 00:14:51 +00:00
2006-03-02 13:23:18 +00:00
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
2004-12-03 00:14:51 +00:00
2006-03-02 13:23:18 +00:00
pathcomp="$pathcomp/"
done
2004-12-03 00:14:51 +00:00
done
exit $errstatus
# mkinstalldirs ends here