Compare commits

...

14 Commits
7.1.2 ... 8.0.1

Author SHA1 Message Date
Brooke Kuhlmann
48deaa9f46 Added version release notes. 2020-01-01 08:21:04 -07:00
Brooke Kuhlmann
0899233085 Updated to Ruby 2.7.0.
[Details](https://is.gd/mGVQIu).

Merry Christmas!
2019-12-25 06:52:02 -07:00
Brooke Kuhlmann
39cbeefef8 Refactored caffeinate machine function to process grep.
Leverages `pgrep` instead of `ps` for more efficient code.
2019-12-07 14:38:52 -07:00
Brooke Kuhlmann
98c4663f43 Updated README screencast.
Necessary to support the new format and branding.
2019-10-31 07:20:18 -06:00
Brooke Kuhlmann
76c1250cc5 Added Startup Security Utility to README.
Explains how to use these utilities which is useful to know when
dealing with new hardware security features.

[ci skip]
2019-10-13 13:43:52 -06:00
Brooke Kuhlmann
006593b402 Added version release notes. 2019-10-12 10:52:38 -06:00
Brooke Kuhlmann
f989334a11 Updated to macOS Catalina.
[Features](https://www.apple.com/macos/catalina).
2019-10-12 10:49:42 -06:00
Brooke Kuhlmann
b2949b0b7b Updated to Rake 13.0.0.
Provides future support for Ruby 2.7.0 and drops support for Ruby
versions older than 2.2.0.

[Details](https://github.com/ruby/rake/blob/master/History.rdoc).
2019-10-01 20:22:12 -06:00
Brooke Kuhlmann
40bd5dea2d Updated to Ruby 2.6.5.
Resolves several security vulnerabilities:

- CVE-2019-16255: A code injection vulnerability of Shell#[] and
  Shell#test
- CVE-2019-16254: HTTP response splitting in WEBrick (Additional fix)
- CVE-2019-15845: A NUL injection vulnerability of File.fnmatch and
  File.fnmatch?
- CVE-2019-16201: Regular Expression Denial of Service vulnerability of
  WEBrick’s Digest access authentication

[Details](https://is.gd/qWSrzR)
2019-10-01 17:51:03 -06:00
Brooke Kuhlmann
f8619eedc8 Added version release notes. 2019-09-01 09:02:55 -06:00
Brooke Kuhlmann
3b5fc4e36f Updated to Ruby 2.6.4.
Resolves issues with jQuery vulnerabilities in RDoc.

- [Ruby 2.6.4 Release Notes](https://is.gd/dNIrnn).
- [Multiple jQuery vulnerabilities in RDoc](https://is.gd/RNRZHr).
2019-08-28 07:23:15 -06:00
Brooke Kuhlmann
dde21b5bef Updated README screencast tutorial.
Provides improved descriptions, examples, and new theming.

[ci skip]
2019-08-18 11:16:37 -06:00
Brooke Kuhlmann
eb286cd150 Added version release notes. 2019-08-01 06:53:28 -06:00
Brooke Kuhlmann
c2c9ebf14e Added file install function.
Was originally removed in this commit (a895090ca9) and has been
restored in order to handle situations where we have only a single file
install.

For example, the MacOS Config project needs this function in order to
properly install the Pathogem (Vim) file.
2019-07-20 10:43:13 -06:00
8 changed files with 74 additions and 9 deletions

View File

@@ -1 +1 @@
2.6.3 2.7.0

View File

@@ -1,3 +1,25 @@
# 8.0.1 (2020-01-01)
- Added Startup Security Utility to README.
- Updated README screencast.
- Updated to Ruby 2.7.0.
- Refactored caffeinate machine function to process grep.
# 8.0.0 (2019-10-12)
- Updated to Rake 13.0.0.
- Updated to Ruby 2.6.5.
- Updated to macOS Catalina.
# 7.2.1 (2019-09-01)
- Updated README screencast tutorial.
- Updated to Ruby 2.6.4.
# 7.2.0 (2019-08-01)
- Added file install function.
# 7.1.2 (2019-06-01) # 7.1.2 (2019-06-01)
- Updated contributing documentation. - Updated contributing documentation.

View File

@@ -2,5 +2,5 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "rake", "~> 12.0" gem "rake", "~> 13.0"
gem "git-cop", "~> 3.5" gem "git-cop", "~> 3.5"

View File

@@ -31,6 +31,7 @@ the two projects are meant to be used:
- [Setup](#setup) - [Setup](#setup)
- [Usage](#usage) - [Usage](#usage)
- [Boot Disk](#boot-disk) - [Boot Disk](#boot-disk)
- [Startup Security Utility](#startup-security-utility)
- [Customization](#customization) - [Customization](#customization)
- [Troubleshooting](#troubleshooting) - [Troubleshooting](#troubleshooting)
- [Versioning](#versioning) - [Versioning](#versioning)
@@ -60,11 +61,11 @@ the two projects are meant to be used:
## Screencast ## Screencast
[![asciicast](https://asciinema.org/a/155990.png)](https://asciinema.org/a/155990) [![asciicast](https://asciinema.org/a/278158.svg)](https://asciinema.org/a/278158)
## Requirements ## Requirements
1. [macOS Mojave](https://www.apple.com/macos) (with latest software updates applied) 1. [macOS Catalina](https://www.apple.com/macos/catalina) (with latest software updates applied)
1. [Xcode](https://developer.apple.com/xcode) (with accepted license agreement) 1. [Xcode](https://developer.apple.com/xcode) (with accepted license agreement)
## Setup ## Setup
@@ -76,7 +77,7 @@ Current Version (stable):
git clone https://github.com/bkuhlmann/mac_os.git git clone https://github.com/bkuhlmann/mac_os.git
cd mac_os cd mac_os
git checkout 7.1.2 git checkout 8.0.1
Master Version (unstable): Master Version (unstable):
@@ -154,6 +155,32 @@ documentation (provided here for reference):
4. Wait for the macOS installer to load from the recovery partition. 4. Wait for the macOS installer to load from the recovery partition.
5. Use the dialog options to launch Disk Utility, reinstall the system, etc. 5. Use the dialog options to launch Disk Utility, reinstall the system, etc.
Depending on your security settings, you might need to use the Startup Security Utility before using
the Boot Disk (see below).
### [Startup Security Utility](https://support.apple.com/en-us/HT208198)
With newer hardware, you should be running with the Apple T2 Security Chip (found via  → About This
Mac → Overview → System Report → Controller). In order to boot your machine using the Boot Disk,
you'll need to *temporarily* disable the default security settings as follows:
- Turn on or restart your Mac, then press and hold `COMMAND + R` immediately after seeing the Apple
logo.
- Select Utilities → Startup Security Utility from the main menu.
- Click "Turn Off Firmware Password".
- Select "Secure Boot: No Security".
- Select "External Boot: Allow booting from external media".
- Quit the utility and restart the machine.
You'll now be able to boot your system with the Boot Disk (see above).
After the new operating system has been installed via the Boot Disk, *ensure you return to the
Startup Security Utility and re-enable the following settings*:
- Click "Turn On Firmware Password".
- Select "Secure Boot: Full Security".
- Select "External Boot: Disallow booting from external or removable media".
### Customization ### Customization
All executable scripts can be found in the `bin` folder: All executable scripts can be found in the `bin` folder:

View File

@@ -23,7 +23,7 @@ printf " 5. Use the dialog options to launch Disk Utility, reinstall the system
printf "\nCreating macOS boot disk...\n" printf "\nCreating macOS boot disk...\n"
if [[ ! -e "$MAC_OS_BOOT_DISK_CREATOR" ]]; then if [[ ! -e "$MAC_OS_BOOT_DISK_CREATOR" ]]; then
printf "ERROR: macOS installer does not exist: $MAC_OS_BOOT_DISK_CREATOR. Use App Store to download.\n" printf "ERROR: macOS installer does not exist: $MAC_OS_BOOT_DISK_CREATOR. Use System Preferences → Software Update to download.\n"
exit 1 exit 1
fi fi

View File

@@ -123,7 +123,6 @@ install_program() {
local install_path=$(get_install_path "$program_name") local install_path=$(get_install_path "$program_name")
if [[ ! -e "$install_path" ]]; then if [[ ! -e "$install_path" ]]; then
printf "Installing: $install_path...\n"
download_file "$url" "$program_name" download_file "$url" "$program_name"
mv "$MAC_OS_WORK_PATH/$program_name" "$install_path" mv "$MAC_OS_WORK_PATH/$program_name" "$install_path"
chmod 755 "$install_path" chmod 755 "$install_path"
@@ -172,6 +171,23 @@ install_git_project() {
} }
export -f install_git_project export -f install_git_project
# Installs a single file.
# Parameters: $1 (required) - URL, $2 (required) - Install path.
install_file() {
local file_url="$1"
local file_name=$(get_file_name "$1")
local install_path="$2"
if [[ ! -e "$install_path" ]]; then
download_file "$file_url" "$file_name"
mkdir -p $(dirname "$install_path")
mv "$MAC_OS_WORK_PATH/$file_name" "$install_path"
printf "Installed: $file_name.\n"
verify_path "$install_path"
fi
}
export -f install_file
# Downloads remote file to local disk. # Downloads remote file to local disk.
# Parameters: $1 (required) - URL, $2 (required) - File name, $3 (optional) - HTTP header. # Parameters: $1 (required) - URL, $2 (required) - File name, $3 (optional) - HTTP header.
download_file() { download_file() {

View File

@@ -5,7 +5,7 @@ set -o errexit
set -o pipefail set -o pipefail
IFS=$'\n\t' IFS=$'\n\t'
export MAC_OS_BOOT_DISK_CREATOR="/Applications/Install macOS Mojave.app/Contents/Resources/createinstallmedia" export MAC_OS_BOOT_DISK_CREATOR="/Applications/Install macOS Catalina.app/Contents/Resources/createinstallmedia"
export MAC_OS_BOOT_DISK_PATH="/Volumes/Untitled" export MAC_OS_BOOT_DISK_PATH="/Volumes/Untitled"
export MAC_OS_WORK_PATH=/tmp/downloads export MAC_OS_WORK_PATH=/tmp/downloads
export MAC_OS_CONFIG_PATH="../mac_os-config" export MAC_OS_CONFIG_PATH="../mac_os-config"

View File

@@ -19,7 +19,7 @@ export -f clean_work_path
# Caffeinate machine. # Caffeinate machine.
caffeinate_machine() { caffeinate_machine() {
local pid=$(ps aux | grep caffeinate | grep -v grep | awk '{print $2}') local pid=$(pgrep -x caffeinate)
if [[ -n "$pid" ]]; then if [[ -n "$pid" ]]; then
printf "Whoa, tweaker, machine is already caffeinated!\n" printf "Whoa, tweaker, machine is already caffeinated!\n"