Skip to content

Instantly share code, notes, and snippets.

@jlamendo
Last active August 29, 2015 14:10
Show Gist options
  • Save jlamendo/1863a4f871a74580131e to your computer and use it in GitHub Desktop.
Save jlamendo/1863a4f871a74580131e to your computer and use it in GitHub Desktop.
Xcode Eula Auto Accept
#!/usr/bin/expect
set timeout 5
spawn sudo xcodebuild -license
expect {
"By typing 'agree' you are agreeing to the terms of the software license agreements." {
send "agree\r\n";
}
"Software License Agreements Press 'space' for more, or 'q' to quit" {
send " ";
exp_continue;
}
"Hit the Enter key to view the license agreements at \'/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf\'" {
send "\r\n";
exp_continue;
}
timeout {
send_user "Timeout";
}
}
expect {
timeout {
send_user "\nFailed\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment