Skip to content

Instantly share code, notes, and snippets.

@T1T4N
Created August 7, 2017 14:34
Show Gist options
  • Save T1T4N/b1431b2722a261e0cd68cabf8f3549d4 to your computer and use it in GitHub Desktop.
Save T1T4N/b1431b2722a261e0cd68cabf8f3549d4 to your computer and use it in GitHub Desktop.
Specify Xcode developer dir by version
DEVELOPER_DIR=$(XCODE_VER=9; TMP_RET=$(ls "/Applications" | grep -E "Xcode-?${XCODE_VER}.*\.app" | head -n 1 | xargs -I {} echo "/Applications/{}/Contents/Developer"); [[ ${TMP_RET} ]] || TMP_RET=$(/usr/bin/xcrun xcode-select -p); echo $TMP_RET) eval echo '$DEVELOPER_DIR'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment