Bug 997: Fix unlikely stack corruption in get_pasv_socket.
[elinks/elinks-j605.git] / config / mkinstalldirs
blob53546b4d824af741aacd934d179acdbd0d6f88c5
1 #! /bin/sh
2 # mkinstalldirs --- make directory hierarchy
3 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
4 # Created: 1993-05-16
5 # Public domain
8 errstatus=0
10 for file
12 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
13 shift
15 pathcomp=
16 for d
18 pathcomp="$pathcomp$d"
19 case "$pathcomp" in
20 -* ) pathcomp=./$pathcomp ;;
21 esac
23 if test ! -d "$pathcomp"; then
24 #echo "mkdir $pathcomp"
26 mkdir "$pathcomp" || lasterr=$?
28 if test ! -d "$pathcomp"; then
29 errstatus=$lasterr
33 pathcomp="$pathcomp/"
34 done
35 done
37 exit $errstatus
39 # mkinstalldirs ends here