annotate src/installman.sh @ 18531:352597fa076b

Added tag v8.1.2259 for changeset 41b2506c76621fa78eb056e56fdc892382fba887
author Bram Moolenaar <Bram@vim.org>
date Tue, 05 Nov 2019 22:45:04 +0100
parents 3d6b282e2d6e
children a7b8f78dd868
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 # installman.sh --- install or uninstall manpages 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", "uninstall" or "xxd"
856
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
6 # 2 target directory e.g., "/usr/local/man/it/man1"
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
7 # 3 language addition e.g., "" or "-it"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
8 # 4 vim location as used in manual pages e.g., "/usr/local/share/vim"
16378
3d6b282e2d6e patch 8.1.1194: typos and small problems in source files
Bram Moolenaar <Bram@vim.org>
parents: 14415
diff changeset
9 # 5 runtime dir for menu.vim et al. e.g., "/usr/local/share/vim/vim81"
856
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
10 # 6 runtime dir for global vimrc file e.g., "/usr/local/share/vim"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
11 # 7 source dir for help files e.g., "../runtime/doc"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
12 # 8 mode bits for manpages e.g., "644"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
13 # 9 vim exe name e.g., "vim"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
14 # 10 name of vimdiff exe e.g., "vimdiff"
8cd729851562 updated for version 7.0g
vimboss
parents: 819
diff changeset
15 # 11 name of evim exe e.g., "evim"
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
16
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
17 errstatus=0
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
18
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
19 what=$1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
20 destdir=$2
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
21 langadd=$3
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
22 vimloc=$4
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
23 scriptloc=$5
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
24 vimrcloc=$6
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
25 helpsource=$7
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
26 manmod=$8
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
27 exename=$9
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 201
diff changeset
28 # older shells don't support ${10}
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 201
diff changeset
29 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 201
diff changeset
30 vimdiffname=$9
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 201
diff changeset
31 shift
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 201
diff changeset
32 evimname=$9
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
33
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
34 helpsubloc=$scriptloc/doc
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 856
diff changeset
35 printsubloc=$scriptloc/print
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
36 synsubloc=$scriptloc/syntax
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
37 tutorsubloc=$scriptloc/tutor
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
38
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
39 if test $what = "install" -o $what = "xxd"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
40 if test ! -d $destdir; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
41 echo creating $destdir
11382
3f399c28e4af patch 8.0.0576: can't build when configure choses "install-sh"
Christian Brabandt <cb@256bit.org>
parents: 5999
diff changeset
42 /bin/sh install-sh -c -d $destdir
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
43 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
44 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
45
5999
03f95f5e311b updated for version 7.4.340
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
46 # Note: setting LC_ALL to C is required to avoid illegal byte errors from sed
03f95f5e311b updated for version 7.4.340
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
47 # on some systems.
03f95f5e311b updated for version 7.4.340
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
48
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
49 if test $what = "install"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
50 # vim.1
14415
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
51 if test -r $helpsource/vim$langadd.1; then
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
52 echo installing $destdir/$exename.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
53 LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
54 -e s+$vimloc/doc+$helpsubloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
55 -e s+$vimloc/print+$printsubloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
56 -e s+$vimloc/syntax+$synsubloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
57 -e s+$vimloc/tutor+$tutorsubloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
58 -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
59 -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
60 -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
61 -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
62 -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
63 -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
64 -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
65 -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
66 $helpsource/vim$langadd.1 > $destdir/$exename.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
67 chmod $manmod $destdir/$exename.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
68 fi
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
69
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
70 # vimtutor.1
14415
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
71 if test -r $helpsource/vimtutor$langadd.1; then
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
72 echo installing $destdir/$exename""tutor.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
73 LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
74 -e s+$vimloc/tutor+$tutorsubloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
75 $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
76 chmod $manmod $destdir/$exename""tutor.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
77 fi
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
78
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
79 # vimdiff.1
14415
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
80 if test -r $helpsource/vimdiff$langadd.1; then
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
81 echo installing $destdir/$vimdiffname.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
82 cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
83 chmod $manmod $destdir/$vimdiffname.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
84 fi
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
85
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
86 # evim.1
14415
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
87 if test -r $helpsource/evim$langadd.1; then
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
88 echo installing $destdir/$evimname.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
89 LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
90 -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
91 $helpsource/evim$langadd.1 > $destdir/$evimname.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
92 chmod $manmod $destdir/$evimname.1
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
93 fi
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
94 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
95
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
96 if test $what = "uninstall"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
97 echo Checking for Vim manual pages in $destdir...
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
98 if test -r $destdir/$exename.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
99 echo deleting $destdir/$exename.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
100 rm -f $destdir/$exename.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
101 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
102 if test -r $destdir/$exename""tutor.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
103 echo deleting $destdir/$exename""tutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
104 rm -f $destdir/$exename""tutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
105 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
106 if test -r $destdir/$vimdiffname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
107 echo deleting $destdir/$vimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
108 rm -f $destdir/$vimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
109 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
110 if test -r $destdir/$evimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
111 echo deleting $destdir/$evimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
112 rm -f $destdir/$evimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
113 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
114 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
115
14415
3d2bae2e6b80 patch 8.1.0222: errors are reported for "make install"
Christian Brabandt <cb@256bit.org>
parents: 11382
diff changeset
116 if test $what = "xxd" -a -r "$helpsource/xxd${langadd}.1"; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
117 echo installing $destdir/xxd.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
118 cp $helpsource/xxd$langadd.1 $destdir/xxd.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
119 chmod $manmod $destdir/xxd.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
120 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
121
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
122 exit $errstatus
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
123
201
300fac7c5a2b updated for version 7.0059
vimboss
parents: 40
diff changeset
124 # vim: set sw=3 sts=3 :