Already merged, but posting here in case anyone wants to double-check.
Before updating any eclass, email patches to the gentoo-dev list. It
may be that your proposed change is broken in a way you had not
anticipated, or that there is an existing function which performs the
same purpose, or that your function may be better off in its own
eclass. If you don't email gentoo-dev first, and end up breaking
something, expect to be in a lot of trouble.
On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:
- find $d/doc -name \*.txt -type l | while read s; do
- [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
+ find ${d}/doc -name \*.txt -type l | while read s; do
+ [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"
- einfo "Removing $d"
- rm -r "$d"
+ einfo "Removing ${d}"
+ rm -r "${d}"
- if [[ -d $vimfiles/doc ]]; then
- ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
+ if [[ -d "${vimfiles}"/doc ]]; then
+ ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null
On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:
- find $d/doc -name \*.txt -type l | while read s; do
- [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
+ find ${d}/doc -name \*.txt -type l | while read s; do
+ [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"
This would profit from a "|| die" statement.
- einfo "Removing $d"
- rm -r "$d"
+ einfo "Removing ${d}"
+ rm -r "${d}"
Ditto.
- if [[ -d $vimfiles/doc ]]; then
- ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
+ if [[ -d "${vimfiles}"/doc ]]; then
+ ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null
Ditto.
On 2022-04-06 12:54, Ulrich Mueller wrote:
On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:
- find $d/doc -name \*.txt -type l | while read s; do
- [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
+ find ${d}/doc -name \*.txt -type l | while read s; do
+ [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"
This would profit from a "|| die" statement.
This needs to be nonfatal.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:27:00 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,092 |