Mirror of the Vim source from https://github.com/vim/vim
Révision | 469c42f90fda78344dd4b33e7c0dd0860b777939 (tree) |
---|---|
l'heure | 2007-07-17 21:33:46 |
Auteur | vimboss |
Commiter | vimboss |
updated for version 7.1-030
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 30, | |
671 | +/**/ | |
670 | 672 | 29, |
671 | 673 | /**/ |
672 | 674 | 28, |
@@ -39,18 +39,22 @@ | ||
39 | 39 | # remove the copy of the tutor on exit |
40 | 40 | trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15 |
41 | 41 | |
42 | -# Vim could be called "vim" or "vi". Also check for "vim6", for people who | |
43 | -# have Vim 5.x installed as "vim" and Vim 6.0 as "vim6". | |
44 | -testvim=`which vim6 2>/dev/null` | |
45 | -if test -f "$testvim"; then | |
46 | - VIM=vim6 | |
47 | -else | |
48 | - testvim=`which vim` | |
42 | +# Vim could be called "vim" or "vi". Also check for "vimN", for people who | |
43 | +# have Vim installed with its version number. | |
44 | +# We anticipate up to a future Vim 8 version :-). | |
45 | +seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi" | |
46 | +for i in $seq; do | |
47 | + testvim=`which $i 2>/dev/null` | |
49 | 48 | if test -f "$testvim"; then |
50 | - VIM=vim | |
51 | - else | |
52 | - VIM=vi | |
49 | + VIM=$i | |
50 | + break | |
53 | 51 | fi |
52 | +done | |
53 | + | |
54 | +# When no Vim version was found fall back to "vim", you'll get an error message | |
55 | +# below. | |
56 | +if test -z "$VIM"; then | |
57 | + VIM=vim | |
54 | 58 | fi |
55 | 59 | |
56 | 60 | # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME |