1 |
On 2022-04-06 12:54, Ulrich Mueller wrote: |
2 |
> >>>>> On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote: |
3 |
> |
4 |
> > - find $d/doc -name \*.txt -type l | while read s; do |
5 |
> > - [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s" |
6 |
> > + find ${d}/doc -name \*.txt -type l | while read s; do |
7 |
> > + [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}" |
8 |
> |
9 |
> This would profit from a "|| die" statement. |
10 |
|
11 |
This needs to be nonfatal. |
12 |
|
13 |
> > - einfo "Removing $d" |
14 |
> > - rm -r "$d" |
15 |
> > + einfo "Removing ${d}" |
16 |
> > + rm -r "${d}" |
17 |
> |
18 |
> Ditto. |
19 |
> |
20 |
> > - if [[ -d $vimfiles/doc ]]; then |
21 |
> > - ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null |
22 |
> > + if [[ -d "${vimfiles}"/doc ]]; then |
23 |
> > + ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null |
24 |
> |
25 |
> Ditto. |
26 |
|
27 |
This one only works when nonfatal too. |