humaton / fedora-infra / ansible

Forked from fedora-infra/ansible 5 years ago
Clone

600af65 s3-mirror: avoid potential unexpected shell-expansion, dedup

Authored and Committed by praiskup 5 years ago
    s3-mirror: avoid potential unexpected shell-expansion, dedup
    
    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.
    
        
file modified
+106 -182