annotate mkinstalldirs @ 112453:06719a229a46 default tip

* calc/calc.el (calc-default-power-reference-level) (calc-default-field-reference-level): New variables. * calc/calc-units.el (math-standard-units): Add dB and Np. (math-logunits): New variable. (math-extract-logunits, math-logcombine, calcFunc-luplus) (calcFunc-luminus, calc-luplus, calc-luminus, math-logunit-level) (calcFunc-fieldlevel, calcFunc-powerlevel, calc-level): New functions. (math-find-base-units-rec): Add entry for ln(10). * calc/calc-help.el (calc-u-prefix-help): Add logarithmic help. (calc-ul-prefix-help): New function. * calc/calc-ext.el (calc-init-extensions): Autoload new units functions. Add keybindings for new units functions.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 23 Jan 2011 23:08:04 -0600
parents 14a97ab281d5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
1 #! /bin/sh
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
2 # mkinstalldirs --- make directory hierarchy
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
3
112150
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
4 scriptversion=2009-04-28.21; # UTC
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
5
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
6 # Original author: Noah Friedman <friedman@prep.ai.mit.edu>
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
7 # Created: 1993-05-16
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
8 # Public domain.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
9 #
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
10 # This file is maintained in Automake, please report
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
11 # bugs to <bug-automake@gnu.org> or send patches to
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
12 # <automake-patches@gnu.org>.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
13
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
14 nl='
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
15 '
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
16 IFS=" "" $nl"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
17 errstatus=0
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
18 dirmode=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
19
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
20 usage="\
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
21 Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
22
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
23 Create each directory DIR (with mode MODE, if specified), including all
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
24 leading file name components.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
25
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
26 Report bugs to <bug-automake@gnu.org>."
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
27
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
28 # process command line arguments
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
29 while test $# -gt 0 ; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
30 case $1 in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
31 -h | --help | --h*) # -h for help
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
32 echo "$usage"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
33 exit $?
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
34 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
35 -m) # -m PERM arg
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
36 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
37 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
38 dirmode=$1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
39 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
40 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
41 --version)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
42 echo "$0 $scriptversion"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
43 exit $?
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
44 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
45 --) # stop option processing
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
46 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
47 break
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
48 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
49 -*) # unknown option
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
50 echo "$usage" 1>&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
51 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
52 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
53 *) # first non-opt arg
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
54 break
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
55 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
56 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
57 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
58
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
59 for file
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
60 do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
61 if test -d "$file"; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
62 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
63 else
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
64 break
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
65 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
66 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
67
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
68 case $# in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
69 0) exit 0 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
70 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
71
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
72 # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
73 # mkdir -p a/c at the same time, both will detect that a is missing,
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
74 # one will create a, then the other will try to create a and die with
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
75 # a "File exists" error. This is a problem when calling mkinstalldirs
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
76 # from a parallel make. We use --version in the probe to restrict
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
77 # ourselves to GNU mkdir, which is thread-safe.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
78 case $dirmode in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
79 '')
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
80 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
81 echo "mkdir -p -- $*"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
82 exec mkdir -p -- "$@"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
83 else
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
84 # On NextStep and OpenStep, the `mkdir' command does not
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
85 # recognize any option. It will interpret all options as
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
86 # directories to create, and then abort because `.' already
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
87 # exists.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
88 test -d ./-p && rmdir ./-p
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
89 test -d ./--version && rmdir ./--version
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
90 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
91 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
92 *)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
93 if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
94 test ! -d ./--version; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
95 echo "mkdir -m $dirmode -p -- $*"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
96 exec mkdir -m "$dirmode" -p -- "$@"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
97 else
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
98 # Clean up after NextStep and OpenStep mkdir.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
99 for d in ./-m ./-p ./--version "./$dirmode";
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
100 do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
101 test -d $d && rmdir $d
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
102 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
103 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
104 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
105 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
106
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
107 for file
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
108 do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
109 case $file in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
110 /*) pathcomp=/ ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
111 *) pathcomp= ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
112 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
113 oIFS=$IFS
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
114 IFS=/
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
115 set fnord $file
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
116 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
117 IFS=$oIFS
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
118
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
119 for d
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
120 do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
121 test "x$d" = x && continue
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
122
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
123 pathcomp=$pathcomp$d
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
124 case $pathcomp in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
125 -*) pathcomp=./$pathcomp ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
126 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
127
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
128 if test ! -d "$pathcomp"; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
129 echo "mkdir $pathcomp"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
130
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
131 mkdir "$pathcomp" || lasterr=$?
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
132
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
133 if test ! -d "$pathcomp"; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
134 errstatus=$lasterr
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
135 else
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
136 if test ! -z "$dirmode"; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
137 echo "chmod $dirmode $pathcomp"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
138 lasterr=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
139 chmod "$dirmode" "$pathcomp" || lasterr=$?
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
140
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
141 if test ! -z "$lasterr"; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
142 errstatus=$lasterr
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
143 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
144 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
145 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
146 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
147
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
148 pathcomp=$pathcomp/
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
149 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
150 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
151
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
152 exit $errstatus
112150
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
153
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
154 # Local Variables:
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
155 # mode: shell-script
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
156 # sh-indentation: 2
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
157 # eval: (add-hook 'write-file-hooks 'time-stamp)
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
158 # time-stamp-start: "scriptversion="
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
159 # time-stamp-format: "%:y-%02m-%02d.%02H"
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
160 # time-stamp-time-zone: "UTC"
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
161 # time-stamp-end: "; # UTC"
14a97ab281d5 * install-sh, mkinstalldirs, move-if-change: Update from master
Paul Eggert <eggert@cs.ucla.edu>
parents: 111811
diff changeset
162 # End: