>>>>> On Wed, 17 Aug 2022, wuyy wrote: > Also, I have some long sentences in code, for throwing information. How > do I nicely wrap such long strings in bash? By incremental assigning it > to variables I guess?
It's not an absolute rule. Avoid long lines where possible, but don't jump through hoops to e.g. break long strings in assignments. >> No double empty lines please. (Pkgcheck should have complained about >> this.) > OK. But `pkgcheck scan rocm.eclass` (version 0.10.12) does not > complains. A missing feature maybe? Hm, it warns about it in ebuilds but not in eclasses. This looks like a bug in pkgcheck to me. >> Please don't use internal Portage variables. > OK, although I can't find such warnings on > https://devmanual.gentoo.org/eclass-writing. Maybe an entry should be > added? This is in PMS section 12.3.17 "Reserved commands and variables": https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-13700012.3.17 Let's add it to the devmanual as well: https://github.com/gentoo/devmanual/pull/301/commits/616323bd33f6aee5b579c24e31a4605c36e08b53 >> > + elif [[ -d "${BUILD_DIR}"/clients/staging ]]; then >> >> Quotation marks aren't necessary here. > What if BUILD_DIR contains spaces? That's not a problem because word splitting isn't performed inside [[ ]]: https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#index-_005b_005b Ulrich
signature.asc
Description: PGP signature