annotate src/mkinstalldirs @ 9019:2e3c6071db97 v7.4.1795

commit https://github.com/vim/vim/commit/5487544fa5d46af9f8f98aa4f5c59074a6e0639a Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 26 22:33:17 2016 +0200 patch 7.4.1795 Problem: Compiler warning for redefining RGB. (John Marriott) Solution: Rename it to TORGB.
author Christian Brabandt <cb@256bit.org>
date Tue, 26 Apr 2016 22:45:07 +0200
parents 70c67b1bb1f1
children
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 errstatus=0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 for file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 shift
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 pathcomp=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 for d
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 do
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 pathcomp="$pathcomp$d"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 case "$pathcomp" in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 -* ) pathcomp=./$pathcomp ;;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 esac
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if test ! -d "$pathcomp"; then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 echo "mkdir $pathcomp" 1>&2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 mkdir "$pathcomp" || lasterr=$?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 if test ! -d "$pathcomp"; then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 errstatus=$lasterr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 fi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 fi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 pathcomp="$pathcomp/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 exit $errstatus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 # mkinstalldirs ends here