annotate src/mkinstalldirs @ 934:e44efb3af0d5 v7.0.060

updated for version 7.0-060
author vimboss
date Wed, 16 Aug 2006 17:35:00 +0000
parents 3fc0f57ecb91
children 70c67b1bb1f1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 #! /bin/sh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 # mkinstalldirs --- make directory hierarchy
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 # Created: 1993-05-16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 # Public domain
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 # $Id$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 errstatus=0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 for file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 shift
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 pathcomp=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 for d
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 pathcomp="$pathcomp$d"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 case "$pathcomp" in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 -* ) pathcomp=./$pathcomp ;;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 esac
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 if test ! -d "$pathcomp"; then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 echo "mkdir $pathcomp" 1>&2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 mkdir "$pathcomp" || lasterr=$?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 if test ! -d "$pathcomp"; then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 errstatus=$lasterr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 fi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 fi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 pathcomp="$pathcomp/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 exit $errstatus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 # mkinstalldirs ends here