forked from WolfgangMehner/vim-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkversion.sh
executable file
·75 lines (60 loc) · 1.86 KB
/
checkversion.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash -
#===============================================================================
#
# FILE: checkversion.sh
#
# USAGE: ./checkversion.sh plugin [major version number]
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Dr. Fritz Mehner (fgm), mehner.fritz@web.de
# CREATED: 11.08.2013 10:02
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
#=== FUNCTION ================================================================
# NAME: usage
# DESCRIPTION: Display usage information.
#===============================================================================
function usage ()
{
cat <<- EOT
Usage : ${0##/*/} plugin [major version number]
EOT
} # ---------- end of function usage ----------
[ ${#} -lt 1 ] && usage && exit 0
major=${2:-[[:digit:]]+} # major version number or digits
regex='version[^[:digit:]]+'$major
case $1 in
awk)
echo -e "-- check awk --"
egrep -Rin "$regex" awk-support plugin/awk-support.vim doc/awksupport.txt
;;
bash)
echo -e "-- check bash --"
egrep -Rin "$regex" bash-support plugin/bash-support.vim doc/bashsupport.txt
;;
c)
echo -e "-- check c --"
egrep -Rin "$regex" c-support plugin/c.vim doc/csupport.txt
;;
latex)
echo -e "-- check latex --"
egrep -Rin "$regex" latex-support plugin/latex.vim doc/latexsupport.txt
;;
perl)
echo -e "-- check perl --"
egrep -Rin "$regex" perl-support plugin/perl-support.vim doc/perlsupport.txt
;;
vim)
echo -e "-- check vim --"
egrep -Rin "$regex" vim-support plugin/vim-support.vim doc/vimsupport.txt
;;
*)
echo -e "** no plugin with name '$1' **"
;;
esac # --- end of case ---