annotate src/installman.sh @ 125:2a8d48bdc5de

updated for version 7.0044
author vimboss
date Tue, 25 Jan 2005 21:42:15 +0000
parents f1d2a58883b9
children 300fac7c5a2b
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"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
6 # 2 target directory e.g., "/usr/local/man/it/man1"
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"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
9 # 5 runtime dir for menu.vim et al. e.g., "/usr/local/share/vim/vim70"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
10 # 6 runtime dir for global vimrc file e.g., "/usr/local/share/vim"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
11 # 7 source dir for help files e.g., "../runtime/doc"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
12 # 8 mode bits for manpages e.g., "644"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
13 # 9 vim exe name e.g., "vim"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
14 # 10 name of vimdiff exe e.g., "vimdiff"
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
15 # 11 name of evim exe e.g., "evim"
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
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
28 vimdiffname=${10}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
29 evimname=${11}
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
30
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
31 helpsubloc=$scriptloc/doc
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
32 synsubloc=$scriptloc/syntax
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
33 tutorsubloc=$scriptloc/tutor
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
34
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
35 if test $what = "install" -o $what = "xxd"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
36 if test ! -d $destdir; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
37 echo creating $destdir
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
38 ./mkinstalldirs $destdir
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
39 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
40 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
41
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
42 if test $what = "install"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
43 # vim.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
44 echo installing $destdir/$exename.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
45 sed -e s+/usr/local/lib/vim+$vimloc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
46 -e s+$vimloc/doc+$helpsubloc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
47 -e s+$vimloc/syntax+$synsubloc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
48 -e s+$vimloc/tutor+$tutorsubloc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
49 -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
50 -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
51 -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
52 -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
53 -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
54 -e s+$vimloc/ftoff.vim+$scriptloc/ftoff.vim+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
55 -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
56 -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
57 -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
58 $helpsource/vim$langadd.1 > $destdir/$exename.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
59 chmod $manmod $destdir/$exename.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
60
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
61 # vimtutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
62 echo installing $destdir/$exename""tutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
63 sed -e s+/usr/local/lib/vim+$vimloc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
64 -e s+$vimloc/tutor+$tutorsubloc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
65 $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
66 chmod $manmod $destdir/$exename""tutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
67
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
68 # vimdiff.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
69 echo installing $destdir/$vimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
70 cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
71 chmod $manmod $destdir/$vimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
72
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
73 # evim.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
74 echo installing $destdir/$evimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
75 sed -e s+/usr/local/lib/vim+$vimloc+ \
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
76 $helpsource/evim$langadd.1 > $destdir/$evimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
77 chmod $manmod $destdir/$evimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
78 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
79
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
80 if test $what = "uninstall"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
81 echo Checking for Vim manual pages in $destdir...
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
82 if test -r $destdir/$exename.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
83 echo deleting $destdir/$exename.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
84 rm -f $destdir/$exename.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
85 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
86 if test -r $destdir/$exename""tutor.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
87 echo deleting $destdir/$exename""tutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
88 rm -f $destdir/$exename""tutor.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
89 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
90 if test -r $destdir/$vimdiffname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
91 echo deleting $destdir/$vimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
92 rm -f $destdir/$vimdiffname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
93 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
94 if test -r $destdir/$evimname.1; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
95 echo deleting $destdir/$evimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
96 rm -f $destdir/$evimname.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
97 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
98 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
99
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
100 if test $what = "xxd"; then
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
101 echo installing $destdir/xxd.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
102 cp $helpsource/xxd$langadd.1 $destdir/xxd.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
103 chmod $manmod $destdir/xxd.1
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
104 fi
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
105
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
106 exit $errstatus
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
107
f1d2a58883b9 updated for version 7.0024
vimboss
parents:
diff changeset
108 # vim: set sw=3 :