The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
# Run using "sudo accept_xcode_license.sh" | |
# | |
# Solving the OSX Yosemite Xcode Command Line Tools Licensing problem | |
# for multiple updates in order to script post-install tasks. | |
# Typical error reads after running "xcode-select --install" when setting up | |
# Homebrew is: "Agreeing to the Xcode/iOS license requires admin priviledges, | |
# please re-run as root via sudo" | |
# | |
# CREDIT: | |
# Based on a tip found at http://krypted.com/mac-os-x/licensing-the-xcode-command-line-tools/ |
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright 2014 - The Regents of the University of Michigan. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
import tempfile, os.path, shutil, glob, os, subprocess, re | |
debug = True | |
# It should take the logs from tmp and clone them somewhere | |
# It can then bunzip and combine them | |
def log(s): | |
global debug | |
if debug: | |
print s |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
#!/usr/bin/python | |
import plistlib, os.path, os | |
# Based off of https://forums.developer.apple.com/message/6741 | |
# and http://apple.stackexchange.com/a/136976 | |
def jdk_info_plists(): | |
# Find all the JDK Info.plist files | |
JDK_ROOT = "/Library/Java/JavaVirtualMachines" | |
if (os.path.exists(JDK_ROOT) and os.path.isdir(JDK_ROOT)): |