Skip to content

Detecting XCode Command Line Tools #1

@smt

Description

@smt

xcode-select -p should return a status of 2 if the CLT do not exist, which seems to be consistent with my brief testing and this StackOverflow answer. This works in Yosemite, and possibly Mavericks as well.

# Download and install Command Line Tools
xcode-select -p 1>/dev/null
if [[ $? -ne 0 ]]; then
    echo "Info   | Install   | xcode"
    xcode-select --install
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions