From 0b31b96c55620dcf7c5ca657d3572a8c635c971b Mon Sep 17 00:00:00 2001 From: Erik Reckase Date: Mon, 19 Apr 2010 19:52:20 +0000 Subject: Initial commit of early-clip branch of flam3 into google code. git-svn-id: https://flam3.googlecode.com/svn/trunk@3 77852712-ef1d-11de-8684-7d64432d61a3 --- src/mkinstalldirs | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 src/mkinstalldirs (limited to 'src/mkinstalldirs') diff --git a/src/mkinstalldirs b/src/mkinstalldirs new file mode 100755 index 0000000..318cc98 --- /dev/null +++ b/src/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1.1.1 2004-10-26 19:54:13 spotspot Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here -- cgit v1.2.3