1 |
Signed-off-by: Thomas Bracht Laumann Jespersen <t@×××××××.xyz> |
2 |
--- |
3 |
Already merged, but posting here in case anyone wants to double-check. |
4 |
|
5 |
eclass/vim-doc.eclass | 40 ++++++++++++++++++++-------------------- |
6 |
1 file changed, 20 insertions(+), 20 deletions(-) |
7 |
|
8 |
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass |
9 |
index ba9d00f4f5e..de28ddfdfee 100644 |
10 |
--- a/eclass/vim-doc.eclass |
11 |
+++ b/eclass/vim-doc.eclass |
12 |
@@ -1,10 +1,10 @@ |
13 |
-# Copyright 1999-2021 Gentoo Authors |
14 |
+# Copyright 1999-2022 Gentoo Authors |
15 |
# Distributed under the terms of the GNU General Public License v2 |
16 |
|
17 |
# @ECLASS: vim-doc.eclass |
18 |
# @MAINTAINER: |
19 |
# vim@g.o |
20 |
-# @SUPPORTED_EAPIS: 6 7 |
21 |
+# @SUPPORTED_EAPIS: 6 7 8 |
22 |
# @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags. |
23 |
# @DESCRIPTION: |
24 |
# This eclass is used by vim.eclass and vim-plugin.eclass to update |
25 |
@@ -16,8 +16,8 @@ |
26 |
# DEPEND in vim-plugin or by whatever version of vim is being |
27 |
# installed by the eclass. |
28 |
|
29 |
-case ${EAPI:-0} in |
30 |
- [67]) ;; |
31 |
+case ${EAPI} in |
32 |
+ 6|7|8) ;; |
33 |
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
34 |
esac |
35 |
|
36 |
@@ -30,12 +30,12 @@ update_vim_helptags() { |
37 |
# This is where vim plugins are installed |
38 |
vimfiles="${EROOT}"/usr/share/vim/vimfiles |
39 |
|
40 |
- if [[ $PN != vim-core ]]; then |
41 |
+ if [[ ${PN} != vim-core ]]; then |
42 |
# Find a suitable vim binary for updating tags :helptags |
43 |
vim=$(type -P vim 2>/dev/null) |
44 |
- [[ -z "$vim" ]] && vim=$(type -P gvim 2>/dev/null) |
45 |
- [[ -z "$vim" ]] && vim=$(type -P kvim 2>/dev/null) |
46 |
- if [[ -z "$vim" ]]; then |
47 |
+ [[ -z "${vim}" ]] && vim=$(type -P gvim 2>/dev/null) |
48 |
+ [[ -z "${vim}" ]] && vim=$(type -P kvim 2>/dev/null) |
49 |
+ if [[ -z "${vim}" ]]; then |
50 |
ewarn "No suitable vim binary to rebuild documentation tags" |
51 |
fi |
52 |
fi |
53 |
@@ -50,32 +50,32 @@ update_vim_helptags() { |
54 |
# Install the documentation symlinks into the versioned vim |
55 |
# directory and run :helptags |
56 |
for d in "${EROOT%/}"/usr/share/vim/vim[0-9]*; do |
57 |
- [[ -d "$d/doc" ]] || continue # catch a failed glob |
58 |
+ [[ -d "${d}/doc" ]] || continue # catch a failed glob |
59 |
|
60 |
# Remove links, and possibly remove stale dirs |
61 |
- find $d/doc -name \*.txt -type l | while read s; do |
62 |
- [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s" |
63 |
+ find ${d}/doc -name \*.txt -type l | while read s; do |
64 |
+ [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}" |
65 |
done |
66 |
- if [[ -f "$d/doc/tags" && $(find "$d" | wc -l | tr -d ' ') = 3 ]]; then |
67 |
+ if [[ -f "${d}/doc/tags" && $(find "${d}" | wc -l | tr -d ' ') = 3 ]]; then |
68 |
# /usr/share/vim/vim61 |
69 |
# /usr/share/vim/vim61/doc |
70 |
# /usr/share/vim/vim61/doc/tags |
71 |
- einfo "Removing $d" |
72 |
- rm -r "$d" |
73 |
+ einfo "Removing ${d}" |
74 |
+ rm -r "${d}" |
75 |
continue |
76 |
fi |
77 |
|
78 |
# Re-create / install new links |
79 |
- if [[ -d $vimfiles/doc ]]; then |
80 |
- ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null |
81 |
+ if [[ -d "${vimfiles}"/doc ]]; then |
82 |
+ ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null |
83 |
fi |
84 |
|
85 |
# Update tags; need a vim binary for this |
86 |
- if [[ -n "$vim" ]]; then |
87 |
- einfo "Updating documentation tags in $d" |
88 |
- DISPLAY= $vim -u NONE -U NONE -T xterm -X -n -f \ |
89 |
+ if [[ -n "${vim}" ]]; then |
90 |
+ einfo "Updating documentation tags in ${d}" |
91 |
+ DISPLAY= "${vim}" -u NONE -U NONE -T xterm -X -n -f \ |
92 |
'+set nobackup nomore' \ |
93 |
- "+helptags $d/doc" \ |
94 |
+ "+helptags ${d}/doc" \ |
95 |
'+qa!' </dev/null &>/dev/null |
96 |
fi |
97 |
done |
98 |
-- |
99 |
2.34.1 |