Skip to content
  • mark's avatar
    ea1bd330
    ENH: command-line query for the OPENFOAM_PLUS wmake value (issue #378) · ea1bd330
    mark authored and Mark OLESEN's avatar Mark OLESEN committed
    Examples,
    
        wmakePrintBuild -plus
    
    Check if value is known
    (ie, everything configured and also OpenFOAM+):
    
        if wmakePrintBuild -plus >/dev/null 2>&1
        then
            echo YES
        else
            echo NO
        fi
    
    Check if version is new enough
    
        if ofver=$(wmakePrintBuild -plus 2>/dev/null) && [ "$ofver" -ge 1612 ]
        then
            echo YES
        else
            echo NO
        fi
    
    Conditionals
    
        ofver=$(wmakePrintBuild -plus 2>/dev/null)
        case "${ofver:=0}" in
        1612)
            echo "something for 1612
            ;;
        1706)
            echo "something for 1706
            ;;
        esac
    ea1bd330
    ENH: command-line query for the OPENFOAM_PLUS wmake value (issue #378)
    mark authored and Mark OLESEN's avatar Mark OLESEN committed
    Examples,
    
        wmakePrintBuild -plus
    
    Check if value is known
    (ie, everything configured and also OpenFOAM+):
    
        if wmakePrintBuild -plus >/dev/null 2>&1
        then
            echo YES
        else
            echo NO
        fi
    
    Check if version is new enough
    
        if ofver=$(wmakePrintBuild -plus 2>/dev/null) && [ "$ofver" -ge 1612 ]
        then
            echo YES
        else
            echo NO
        fi
    
    Conditionals
    
        ofver=$(wmakePrintBuild -plus 2>/dev/null)
        case "${ofver:=0}" in
        1612)
            echo "something for 1612
            ;;
        1706)
            echo "something for 1706
            ;;
        esac
Loading