├── LICENSE ├── Miro.download.recipe ├── README.md ├── dockerPostInstall.sh ├── iOS-simulator.sh ├── iOStools.sh ├── java-select.sh ├── javaRootCerts.sh ├── terminal-notifier.sh ├── xcode-delete.sh ├── xcode-install-install.sh ├── xcode-install.sh └── xcode-select.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Tony Williams 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Miro.download.recipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Comment 6 | Created with Recipe Robot v1.1.2 (https://github.com/homebysix/recipe-robot) 7 | Description 8 | Downloads the latest version of Miro. 9 | Identifier 10 | au.com.suncorp.download.Miro 11 | Input 12 | 13 | DOWNLOAD_URL 14 | https://desktop.realtimeboard.com/platforms/darwin/Miro%20-%20formerly%20RealtimeBoard.dmg?__hstc=18393318.fdea307d4b78b9a85eae28712aaaee79.1575410862885.1575410862885.1575410862885.1&__hssc=18393318.1.1575410862885&__hsfp=2052986367 15 | NAME 16 | Miro 17 | 18 | MinimumVersion 19 | 1.0.0 20 | Process 21 | 22 | 23 | Arguments 24 | 25 | filename 26 | %NAME%.dmg 27 | url 28 | %DOWNLOAD_URL% 29 | 30 | Processor 31 | URLDownloader 32 | 33 | 34 | Processor 35 | EndOfCheckPhase 36 | 37 | 38 | Arguments 39 | 40 | input_path 41 | %pathname%/Miro - formerly RealtimeBoard.app 42 | requirement 43 | identifier "com.electron.realtimeboard" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = M3GM7MFY7U 44 | 45 | Processor 46 | CodeSignatureVerifier 47 | 48 | 49 | Arguments 50 | 51 | input_plist_path 52 | %pathname%/Miro - formerly RealtimeBoard.app/Contents/Info.plist 53 | plist_version_key 54 | CFBundleShortVersionString 55 | 56 | Processor 57 | Versioner 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Developer Tools 2 | 3 | These are some scripts I use to perform all the tasks a developer wants to do on a Mac that require admin priveliges. 4 | 5 | You don't need to give developers enhanced rights and let them break the Mac and your security, use this stuff instead. 6 | 7 | More details at https://macintoshguy.wordpress.com/2019/12/03/handling-xcode/ 8 | -------------------------------------------------------------------------------- /dockerPostInstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # docker postinstall script 4 | # 5 | # loads network privleged helper and adds entry to host file 6 | 7 | launchdaemon="/Library/LaunchDaemons/com.docker.vmnetd.plist" 8 | docker_hosts_entry="# Added by Docker Desktop 9 | # To allow the same kube context to work on the host and the container: 10 | 127.0.0.1 kubernetes.docker.internal 11 | # End of section 12 | " 13 | 14 | launchctl load "${launchdaemon}" 15 | 16 | check_for_hosts_entry=$(cat /etc/hosts | grep "$(echo "${docker_hosts_entry}" | head -n1)") 17 | 18 | if [ -z "${check_for_hosts_entry}" ] ; then 19 | echo "${docker_hosts_entry}" >> /etc/hosts 20 | fi 21 | 22 | exit 23 | -------------------------------------------------------------------------------- /iOS-simulator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # iOS_simulator.sh v1.0 4 | # ARW 1/12/2019 5 | # Installs a chosen iOS simulator 6 | 7 | app=$(osascript <> /Users/${consoleuser}/.gemrc 20 | /usr/local/bin/terminal-notifier -sound default -title "xcode-install" \ 21 | -contentImage /Library/Assets/logo-light.png \ 22 | -message "Installing rubyzip" 23 | # for some reason we can't download rubyzip from behind our proxy so install it using our package 24 | # then delete the package :) 25 | /usr/local/opt/ruby/bin/gem install /Users/Shared/rubyzip-1.3.0.gem 26 | rm /Users/Shared/rubyzip-1.3.0.gem 27 | # now (finally) install our tool 28 | /usr/local/bin/terminal-notifier -sound default -title "xcode-install" \ 29 | -contentImage /Library/Assets/logo-light.png \ 30 | -message "Installing xcode-install" 31 | /usr/local/opt/ruby/bin/gem install xcode-install 32 | -------------------------------------------------------------------------------- /xcode-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # xcodeInstall.sh v2.3 4 | # hacked this out of the old post install script. It assumes you have downloaded and unpacked Xcode in your Downloads folder. 5 | # 6 | # 7 | # 23 Sept 2019 - Tony Williams 8 | # clean up script from old Casper 9 | # v2.1 Added tool install 10 | # v2.2 Bugs? Never bugs! 11 | # v2.3 4/11/2019 ARW Added '-allowUntrusted' to fix problem with tighter macOS security 12 | 13 | # Install for Xcode - based on Hunty's post install 14 | # but not hardcoding Xcode and run postinstall (xcode installed to default - coz i don't wanna repkg :)) 15 | # 16 | # it will check for an Xcode app in the default location 17 | # if found it will rename it to Xcode_${version}.app 18 | # and then: 19 | # - accept license 20 | # - add current user to _developer 21 | # - enable developer mode 22 | # - install all embedded pkgs 23 | 24 | consoleuser="$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')" 25 | 26 | xcode="/Users/${consoleuser}/Downloads/Xcode.app" 27 | xcode_default_path="/Applications/Xcode.app" 28 | 29 | # here is the hack 30 | if [ -d "${xcode}" ] 31 | then 32 | /usr/local/bin/terminal-notifier -sound default -title "Xcode" \ 33 | -contentImage /Library/Assets/logo-light.png \ 34 | -message "Moving Xcode" 35 | mv "${xcode}" /Applications 36 | else 37 | echo "error: couldn't find Xcode at ${xcode}" 38 | /usr/local/bin/terminal-notifier -sound default -title "Xcode" \ 39 | -contentImage /Library/Assets/logo-light.png \ 40 | -message "Xcode missing at ${xcode}" 41 | exit 1 42 | fi 43 | 44 | if [ -d "${xcode_default_path}" ] 45 | then 46 | plist="${xcode_default_path}/Contents/Info.plist" 47 | version=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ${plist} ) 48 | if [ -z "${version}" ] 49 | then 50 | echo "error: couldn't get Xcode version" 51 | /usr/local/bin/terminal-notifier -sound default -title "Xcode" \ 52 | -contentImage /Library/Assets/logo-light.png \ 53 | -message "Couldn't get Xcode version" 54 | exit 1 55 | fi 56 | # we have a version - check if there is already one present 57 | xcode_new_path="/Applications/Xcode_${version}.app" 58 | if [ -d "${xcode_new_path}" ] 59 | then 60 | echo "error: xcode already exists: ${xcode_new_path}" 61 | /usr/local/bin/terminal-notifier -sound default -title "Xcode" \ 62 | -contentImage /Library/Assets/logo-light.png \ 63 | -message "Xcode already exists: ${xcode_new_path}" 64 | exit 1 65 | else 66 | # rename app 67 | mv "${xcode_default_path}" "${xcode_new_path}" 68 | fi 69 | else 70 | echo "error: couldn't find Xcode at ${xcode_default_path}" 71 | /usr/local/bin/terminal-notifier -sound default -title "Xcode" \ 72 | -contentImage /Library/Assets/logo-light.png \ 73 | -message "Couldn't find Xcode at ${xcode_default_path}" 74 | exit 1 75 | fi 76 | 77 | # Make user member of the _developer group 78 | /usr/sbin/dseditgroup -o edit -a ${consoleuser} -t user _developer 79 | 80 | # Enable developer mode 81 | /usr/sbin/DevToolsSecurity -enable 82 | 83 | # Accept Xcode license 84 | "${xcode_new_path}/Contents/Developer/usr/bin/xcodebuild" -license accept 85 | 86 | # Install embedded packages 87 | echo "installing embedded packages ..." 88 | /usr/local/bin/terminal-notifier -sound default -title "Xcode" \ 89 | -contentImage /Library/Assets/logo-light.png \ 90 | -message "Installing embedded packages" 91 | 92 | for pkg in "${xcode_new_path}/Contents/Resources/Packages/"*.pkg 93 | do 94 | echo "installing: $pkg ..." 95 | /usr/sbin/installer -allowUntrusted -pkg "$pkg" -target / 96 | done 97 | 98 | echo "done!" 99 | exit 100 | -------------------------------------------------------------------------------- /xcode-select.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # xcode-select.sh v1.0 4 | # ARW 24/9/2019 5 | # runs xcode-select on a chosen Xcode version 6 | 7 | app=$(osascript <