Skip to content
Newer
Older
100644 40 lines (29 sloc) 683 Bytes
ae1912c @bagder Initial revision
bagder authored
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
6
7
8 errstatus=0
9
10 for file
11 do
12 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
13 shift
14
15 pathcomp=
16 for d
17 do
18 pathcomp="$pathcomp$d"
19 case "$pathcomp" in
20 -* ) pathcomp=./$pathcomp ;;
21 esac
22
23 if test ! -d "$pathcomp"; then
ff812cc @dfandrich Make mkinstalldirs ignore umask, for consistency with the rest of the
dfandrich authored
24 echo "mkdir -m0755 $pathcomp" 1>&2
ae1912c @bagder Initial revision
bagder authored
25
ff812cc @dfandrich Make mkinstalldirs ignore umask, for consistency with the rest of the
dfandrich authored
26 mkdir -m0755 "$pathcomp" || lasterr=$?
ae1912c @bagder Initial revision
bagder authored
27
28 if test ! -d "$pathcomp"; then
29 errstatus=$lasterr
30 fi
31 fi
32
33 pathcomp="$pathcomp/"
34 done
35 done
36
37 exit $errstatus
38
39 # mkinstalldirs ends here
Something went wrong with that request. Please try again.