Fix mkinstalldirs quilt conversion
[manu/suphp.git] / debian / patches / 03_mkinstalldirs.diff
1 Index: suphp/config/mkinstalldirs
2 ===================================================================
3 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
4 +++ suphp/config/mkinstalldirs  2012-04-18 12:34:31.229383687 +0200
5 @@ -0,0 +1,40 @@
6 +#! /bin/sh
7 +# mkinstalldirs --- make directory hierarchy
8 +# Author: Noah Friedman <friedman@prep.ai.mit.edu>
9 +# Created: 1993-05-16
10 +# Public domain
11 +
12 +# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
13 +
14 +errstatus=0
15 +
16 +for file
17 +do
18 +   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
19 +   shift
20 +
21 +   pathcomp=
22 +   for d
23 +   do
24 +     pathcomp="$pathcomp$d"
25 +     case "$pathcomp" in
26 +       -* ) pathcomp=./$pathcomp ;;
27 +     esac
28 +
29 +     if test ! -d "$pathcomp"; then
30 +        echo "mkdir $pathcomp"
31 +
32 +        mkdir "$pathcomp" || lasterr=$?
33 +
34 +        if test ! -d "$pathcomp"; then
35 +         errstatus=$lasterr
36 +        fi
37 +     fi
38 +
39 +     pathcomp="$pathcomp/"
40 +   done
41 +done
42 +
43 +exit $errstatus
44 +
45 +# mkinstalldirs ends here