Re: [PATCH] s3-mirror: avoid potential unexpected shell-expansion, dedup

2020-03-22 Thread Adrian Reber
On Sun, Mar 22, 2020 at 12:49:18PM +0100, Pavel Raiskup wrote: > Note that I'd like to propose followup for this. +1 to your patch, looks correct and it makes sense to deduplicate all the exclude lines. > 1. CMD1 could IMO safely exclude _only_ repomd.xml files. > 2, CMD2 could safely _only_

Re: [PATCH] s3-mirror: avoid potential unexpected shell-expansion, dedup

2020-03-22 Thread Pavel Raiskup
Note that I'd like to propose followup for this. 1. CMD1 could IMO safely exclude _only_ repomd.xml files. 2, CMD2 could safely _only_ sync/replace repomd.xml files. 3, then caches need to be invalidated, so we are sure we can --delete 4. CMD3 is keep as-is The current approach is fine as well,

[PATCH] s3-mirror: avoid potential unexpected shell-expansion, dedup

2020-03-22 Thread Pavel Raiskup
Doing this has risk that '*' expands to directories: $> x='echo *' $> $x bin boot dev etc home So it is better to use bash array (we have bash shebang anyways): $> x=( echo '*' ) $> "${x[@]}" * Also de-duplicate few things so it is easier to concentrate on the code. ---