annotate src/installml.sh @ 350:21966c008598

updated for version 7.0091
author vimboss
date Thu, 23 Jun 2005 22:27:26 +0000
parents 8eec9649b7a2
children 23f82b5d2814
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 ""
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
7 # 3 target directory e.g., "/usr/local/man/it/man1"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
8 # 4 vim exe name e.g., "vim"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
9 # 5 vimdiff exe name e.g., "vimdiff"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
10 # 6 evim exe name e.g., "evim"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
11 # 7 ex exe name e.g., "ex"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
12 # 8 view exe name e.g., "view"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
13 # 9 rvim exe name e.g., "rvim"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
14 # 10 rview exe name e.g., "rview"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
15 # 11 gvim exe name e.g., "gvim"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
16 # 12 gview exe name e.g., "gview"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
17 # 13 rgvim exe name e.g., "rgvim"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
18 # 14 rgview exe name e.g., "rgview"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
19 # 15 gvimdiff exe name e.g., "gvimdiff"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
20 # 16 eview exe name e.g., "eview"
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
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
33 rviewname=${10}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
34 gvimname=${11}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
35 gviewname=${12}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
36 rgvimname=${13}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
37 rgviewname=${14}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
38 gvimdiffname=${15}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
39 eviewname=${16}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
40
231
8eec9649b7a2 updated for version 7.0064
vimboss
parents: 228
diff changeset
41 if test $what = "install" -a \( -e $destdir/$vimname.1 -o -e $destdir/$vimdiffname.1 -o -e $destdir/$eviewname.1 \); then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
42 if test ! -d $destdir; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
43 echo creating $destdir
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
44 ./mkinstalldirs $destdir
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
45 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
46
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
47 # ex
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
48 if test ! -e $destdir/$exname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
49 echo creating link $destdir/$exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
50 cd $destdir; ln -s $vimname.1 $exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
51 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
52
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
53 # view
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
54 if test ! -e $destdir/$viewname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
55 echo creating link $destdir/$viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
56 cd $destdir; ln -s $vimname.1 $viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
57 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
58
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
59 # rvim
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
60 if test ! -e $destdir/$rvimname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
61 echo creating link $destdir/$rvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
62 cd $destdir; ln -s $vimname.1 $rvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
63 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
64
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
65 # rview
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
66 if test ! -e $destdir/$rviewname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
67 echo creating link $destdir/$rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
68 cd $destdir; ln -s $vimname.1 $rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
69 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
70
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
71 # GUI targets are optional
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
72 if test "$gui" = "yes"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
73 # gvim
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
74 if test ! -e $destdir/$gvimname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
75 echo creating link $destdir/$gvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
76 cd $destdir; ln -s $vimname.1 $gvimname.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 # gview
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
80 if test ! -e $destdir/$gviewname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
81 echo creating link $destdir/$gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
82 cd $destdir; ln -s $vimname.1 $gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
83 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
84
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
85 # rgvim
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
86 if test ! -e $destdir/$rgvimname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
87 echo creating link $destdir/$rgvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
88 cd $destdir; ln -s $vimname.1 $rgvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
89 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
90
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
91 # rgview
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
92 if test ! -e $destdir/$rgviewname.1 -a -e $destdir/$vimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
93 echo creating link $destdir/$rgviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
94 cd $destdir; ln -s $vimname.1 $rgviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
95 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
96
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
97 # gvimdiff
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
98 if test ! -e $destdir/$gvimdiffname.1 -a -e $destdir/$vimdiffname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
99 echo creating link $destdir/$gvimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
100 cd $destdir; ln -s $vimdiffname.1 $gvimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
101 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
102
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
103 # eview
228
d97518d6b325 updated for version 7.0063
vimboss
parents: 40
diff changeset
104 if test ! -e $destdir/$eviewname.1 -a -e $destdir/$evimname.1; then
40
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
105 echo creating link $destdir/$eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
106 cd $destdir; ln -s $evimname.1 $eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
107 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
108 fi
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 if test $what = "uninstall"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
112 echo Checking for Vim manual page links in $destdir...
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
113
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
114 if test -L $destdir/$exname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
115 echo deleting $destdir/$exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
116 rm -f $destdir/$exname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
117 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
118 if test -L $destdir/$viewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
119 echo deleting $destdir/$viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
120 rm -f $destdir/$viewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
121 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
122 if test -L $destdir/$rvimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
123 echo deleting $destdir/$rvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
124 rm -f $destdir/$rvimname.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/$rviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
127 echo deleting $destdir/$rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
128 rm -f $destdir/$rviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
129 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
130
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
131 # GUI targets are optional
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
132 if test "$gui" = "yes"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
133 if test -L $destdir/$gvimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
134 echo deleting $destdir/$gvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
135 rm -f $destdir/$gvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
136 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
137 if test -L $destdir/$gviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
138 echo deleting $destdir/$gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
139 rm -f $destdir/$gviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
140 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
141 if test -L $destdir/$rgvimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
142 echo deleting $destdir/$rgvimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
143 rm -f $destdir/$rgvimname.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/$rgviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
146 echo deleting $destdir/$rgviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
147 rm -f $destdir/$rgviewname.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/$gvimdiffname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
150 echo deleting $destdir/$gvimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
151 rm -f $destdir/$gvimdiffname.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/$eviewname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
154 echo deleting $destdir/$eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
155 rm -f $destdir/$eviewname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
156 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
157 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
158 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
159
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
160 exit $errstatus
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
161
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
162 # vim: set sw=3 :