oturpe / fedora-docs / template

Forked from fedora-docs/template 2 years ago
Clone

e43e08a Fix if conditions in build.sh

Authored and Committed by Otto Urpelainen 2 years ago
1 file changed. 6 lines added. 6 lines removed.
    Fix if conditions in build.sh
    
    Earlier comment removed quotation from around command substitions $().
    This is not a good idea,
    because if the substitution produces whitespace,
    without the quotes, the result is not interpreted as a single string.
    
    Pattern 'if [ $(uname) == "foo" ]'
    is replaced with 'uname | grep -iwq foo' here.
    
    Apart from following good shell scripting practices,
    this commit fixes the problem where the script failed
    if the current working directory's patch contained whitespace.
    
        
file modified
+6 -6