annotate src/installml.sh @ 22852:84e4dedfa388 v8.2.1973

patch 8.2.1973: finding a patch number can be a bit slow Commit: https://github.com/vim/vim/commit/232f4612e2b0a6a205ae385740078f6b8af05e75 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 10 20:54:29 2020 +0100 patch 8.2.1973: finding a patch number can be a bit slow Problem: Finding a patch number can be a bit slow. Solution: Use binary search. (closes https://github.com/vim/vim/issues/7279)
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 Nov 2020 21:00:04 +0100
parents 3f399c28e4af
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
1 #! /bin/sh
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
2 # installml.sh --- install or uninstall manpage links for Vim
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
3 #
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
4 # arguments:
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
5 # 1 what: "install" or "uninstall"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
6 # 2 also do GUI pages: "yes" or ""
856
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
7 # 3 target directory e.g., "/usr/local/man/it/man1"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
8 # 4 vim exe name e.g., "vim"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
9 # 5 vimdiff exe name e.g., "vimdiff"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
10 # 6 evim exe name e.g., "evim"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
11 # 7 ex exe name e.g., "ex"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
12 # 8 view exe name e.g., "view"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
13 # 9 rvim exe name e.g., "rvim"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
14 # 10 rview exe name e.g., "rview"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
15 # 11 gvim exe name e.g., "gvim"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
16 # 12 gview exe name e.g., "gview"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
17 # 13 rgvim exe name e.g., "rgvim"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
18 # 14 rgview exe name e.g., "rgview"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
19 # 15 gvimdiff exe name e.g., "gvimdiff"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
20 # 16 eview exe name e.g., "eview"
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
21
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
22 errstatus=0
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
23
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
24 what=$1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
25 gui=$2
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
26 destdir=$3
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
27 vimname=$4
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
28 vimdiffname=$5
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
29 evimname=$6
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
30 exname=$7
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
31 viewname=$8
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
32 rvimname=$9
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
33 # old shells don't understand ${10}
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
34 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
35 rviewname=$9
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
36 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
37 gvimname=$9
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
38 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
39 gviewname=$9
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
40 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
41 rgvimname=$9
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
42 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
43 rgviewname=$9
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
44 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
45 gvimdiffname=$9
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
46 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
47 eviewname=$9
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
48
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
49 if test $what = "install" -a \( -f $destdir/$vimname.1 -o -f $destdir/$vimdiffname.1 -o -f $destdir/$eviewname.1 \); then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
50 if test ! -d $destdir; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
51 echo creating $destdir
11382
3f399c28e4af patch 8.0.0576: can't build when configure choses "install-sh"
Christian Brabandt <cb@256bit.org>
parents: 856
diff changeset
52 /bin/sh install-sh -c -d $destdir
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
53 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
54
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
55 # ex
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
56 if test ! -f $destdir/$exname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
57 echo creating link $destdir/$exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
58 cd $destdir; ln -s $vimname.1 $exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
59 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
60
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
61 # view
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
62 if test ! -f $destdir/$viewname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
63 echo creating link $destdir/$viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
64 cd $destdir; ln -s $vimname.1 $viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
65 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
66
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
67 # rvim
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
68 if test ! -f $destdir/$rvimname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
69 echo creating link $destdir/$rvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
70 cd $destdir; ln -s $vimname.1 $rvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
71 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
72
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
73 # rview
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
74 if test ! -f $destdir/$rviewname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
75 echo creating link $destdir/$rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
76 cd $destdir; ln -s $vimname.1 $rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
77 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
78
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
79 # GUI targets are optional
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
80 if test "$gui" = "yes"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
81 # gvim
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
82 if test ! -f $destdir/$gvimname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
83 echo creating link $destdir/$gvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
84 cd $destdir; ln -s $vimname.1 $gvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
85 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
86
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
87 # gview
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
88 if test ! -f $destdir/$gviewname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
89 echo creating link $destdir/$gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
90 cd $destdir; ln -s $vimname.1 $gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
91 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
92
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
93 # rgvim
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
94 if test ! -f $destdir/$rgvimname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
95 echo creating link $destdir/$rgvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
96 cd $destdir; ln -s $vimname.1 $rgvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
97 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
98
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
99 # rgview
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
100 if test ! -f $destdir/$rgviewname.1 -a -f $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
101 echo creating link $destdir/$rgviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
102 cd $destdir; ln -s $vimname.1 $rgviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
103 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
104
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
105 # gvimdiff
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
106 if test ! -f $destdir/$gvimdiffname.1 -a -f $destdir/$vimdiffname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
107 echo creating link $destdir/$gvimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
108 cd $destdir; ln -s $vimdiffname.1 $gvimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
109 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
110
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
111 # eview
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 231
diff changeset
112 if test ! -f $destdir/$eviewname.1 -a -f $destdir/$evimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
113 echo creating link $destdir/$eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
114 cd $destdir; ln -s $evimname.1 $eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
115 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
116 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
117 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
118
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
119 if test $what = "uninstall"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
120 echo Checking for Vim manual page links in $destdir...
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
121
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
122 if test -L $destdir/$exname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
123 echo deleting $destdir/$exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
124 rm -f $destdir/$exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
125 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
126 if test -L $destdir/$viewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
127 echo deleting $destdir/$viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
128 rm -f $destdir/$viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
129 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
130 if test -L $destdir/$rvimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
131 echo deleting $destdir/$rvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
132 rm -f $destdir/$rvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
133 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
134 if test -L $destdir/$rviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
135 echo deleting $destdir/$rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
136 rm -f $destdir/$rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
137 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
138
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
139 # GUI targets are optional
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
140 if test "$gui" = "yes"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
141 if test -L $destdir/$gvimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
142 echo deleting $destdir/$gvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
143 rm -f $destdir/$gvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
144 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
145 if test -L $destdir/$gviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
146 echo deleting $destdir/$gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
147 rm -f $destdir/$gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
148 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
149 if test -L $destdir/$rgvimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
150 echo deleting $destdir/$rgvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
151 rm -f $destdir/$rgvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
152 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
153 if test -L $destdir/$rgviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
154 echo deleting $destdir/$rgviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
155 rm -f $destdir/$rgviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
156 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
157 if test -L $destdir/$gvimdiffname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
158 echo deleting $destdir/$gvimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
159 rm -f $destdir/$gvimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
160 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
161 if test -L $destdir/$eviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
162 echo deleting $destdir/$eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
163 rm -f $destdir/$eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
164 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
165 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
166 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
167
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
168 exit $errstatus
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
169
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
170 # vim: set sw=3 :