1 |
commit: 6ed018f39a8cfd0fe1c2cea09d1dd4b12295ad52 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 20 10:48:48 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 20 10:49:39 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ed018f3 |
7 |
|
8 |
Revert "texlive-common: kill POSIXism" |
9 |
|
10 |
This reverts commit 9eee03a809d88c230e2a57c72e69323dc7493b93. |
11 |
|
12 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
13 |
|
14 |
eclass/texlive-common.eclass | 24 ++++++++++++------------ |
15 |
1 file changed, 12 insertions(+), 12 deletions(-) |
16 |
|
17 |
diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass |
18 |
index ae34e876e9c..593e8855871 100644 |
19 |
--- a/eclass/texlive-common.eclass |
20 |
+++ b/eclass/texlive-common.eclass |
21 |
@@ -35,8 +35,8 @@ TEXMF_VAR_PATH=/var/lib/texmf |
22 |
|
23 |
texlive-common_handle_config_files() { |
24 |
# Handle config files properly |
25 |
- [[ -d ${ED}${TEXMF_PATH} ]] || return |
26 |
- cd "${ED}${TEXMF_PATH}" || doe |
27 |
+ [ -d "${ED}${TEXMF_PATH}" ] || return |
28 |
+ cd "${ED}${TEXMF_PATH}" |
29 |
for f in $(find . -name '*.cnf' -type f -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do |
30 |
if [ "${f#*config}" != "${f}" -o "${f#doc}" != "${f}" -o "${f#source}" != "${f}" -o "${f#tex}" != "${f}" ] ; then |
31 |
continue |
32 |
@@ -55,9 +55,9 @@ texlive-common_handle_config_files() { |
33 |
|
34 |
texlive-common_is_file_present_in_texmf() { |
35 |
local mark="${T}/$1.found" |
36 |
- [[ -d texmf ]] && find texmf -name $1 -exec touch "${mark}" \; |
37 |
- [[ -d texmf-dist ]] && find texmf-dist -name $1 -exec touch "${mark}" \; |
38 |
- [[ -f ${mark} ]] |
39 |
+ [ -d texmf ] && find texmf -name $1 -exec touch "${mark}" \; |
40 |
+ [ -d texmf-dist ] && find texmf-dist -name $1 -exec touch "${mark}" \; |
41 |
+ [ -f "${mark}" ] |
42 |
} |
43 |
|
44 |
# @FUNCTION: texlive-common_do_symlinks |
45 |
@@ -73,7 +73,7 @@ texlive-common_is_file_present_in_texmf() { |
46 |
# also do the fmtutil file parsing. |
47 |
|
48 |
texlive-common_do_symlinks() { |
49 |
- while [[ $# != 0 ]]; do |
50 |
+ while [ $# != 0 ]; do |
51 |
case $1 in |
52 |
cont-??|metafun|mptopdf) |
53 |
einfo "Symlink $1 skipped (special case)" |
54 |
@@ -82,10 +82,10 @@ texlive-common_do_symlinks() { |
55 |
einfo "Symlink $1 -> $2 skipped (texlive-core takes care of it)" |
56 |
;; |
57 |
*) |
58 |
- if [[ $1 = $2 ]]; |
59 |
+ if [ $1 = $2 ]; |
60 |
then |
61 |
einfo "Symlink $1 -> $2 skipped" |
62 |
- elif [[ -e ${ED}/usr/bin/$1 -o -L ${ED}/usr/bin/$1 ]]; |
63 |
+ elif [ -e "${ED}/usr/bin/$1" -o -L "${ED}/usr/bin/$1" ]; |
64 |
then |
65 |
einfo "Symlink $1 skipped (file exists)" |
66 |
else |
67 |
@@ -123,10 +123,10 @@ etexlinks() { |
68 |
# correctly set for the file that it will point to. |
69 |
|
70 |
dobin_texmf_scripts() { |
71 |
- while [[ $# -gt 0 ]] ; do |
72 |
+ while [ $# -gt 0 ] ; do |
73 |
local trg=$(basename ${1} | sed 's,\.[^/]*$,,' | tr '[:upper:]' '[:lower:]') |
74 |
einfo "Installing ${1} as ${trg} bin wrapper" |
75 |
- [[ -x ${ED}/usr/share/${1} ]] || die "Trying to install a non existing or non executable symlink to /usr/bin: ${1}" |
76 |
+ [ -x "${ED}/usr/share/${1}" ] || die "Trying to install a non existing or non executable symlink to /usr/bin: ${1}" |
77 |
dosym ../share/${1} /usr/bin/${trg} || die "failed to install ${1} as $trg" |
78 |
shift |
79 |
done |
80 |
@@ -140,7 +140,7 @@ dobin_texmf_scripts() { |
81 |
|
82 |
etexmf-update() { |
83 |
if has_version 'app-text/texlive-core' ; then |
84 |
- if [[ -z ${ROOT%/} ]] && [[ -x ${EPREFIX}/usr/sbin/texmf-update ]] ; then |
85 |
+ if [ -z "${ROOT%/}" ] && [ -x "${EPREFIX}"/usr/sbin/texmf-update ] ; then |
86 |
"${EPREFIX}"/usr/sbin/texmf-update |
87 |
else |
88 |
ewarn "Cannot run texmf-update for some reason." |
89 |
@@ -158,7 +158,7 @@ etexmf-update() { |
90 |
|
91 |
efmtutil-sys() { |
92 |
if has_version 'app-text/texlive-core' ; then |
93 |
- if [[ -z ${ROOT%/} ]] && [[ -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then |
94 |
+ if [ -z "${ROOT%/}" ] && [ -x "${EPREFIX}"/usr/bin/fmtutil-sys ] ; then |
95 |
einfo "Rebuilding formats" |
96 |
"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null |
97 |
else |