Compare commits

...

32 Commits

Author SHA1 Message Date
Brooke Kuhlmann
160447eda3 Added version release notes 2021-01-10 10:42:35 -07:00
Brooke Kuhlmann
803c38e1c2 Updated boot disk recovery documentation
Improves labeling and categorization consistency while also cleaning up
some of the README terminology.

The recovery option is more of a last resort, provided by Apple, should
something catastrophic happen with the boot disk.
2021-01-10 10:36:09 -07:00
Brooke Kuhlmann
76432f5a74 Fixed brew formulae list error
Resolves the following from happening:

    Error: Calling `brew list` to only list formulae is disabled! Use
    `brew list --formula` instead.

Includes a correction for the plural form for `casks` as well.
2021-01-04 19:31:40 -07:00
Brooke Kuhlmann
85c85a5e80 Added version release notes 2021-01-03 16:49:15 -07:00
Brooke Kuhlmann
b83ecf6516 Removed README Startup Security Utility documentation
Added to the macOS Configuration project, instead, since it makes more
sense to keep all pre and post install steps together in one place.
2021-01-03 14:41:57 -07:00
Brooke Kuhlmann
3889930672 Added caffeination to restore process
Restoration from backup can take a while so this ensures the machine
doesn't go to sleep during this process.
2021-01-03 14:41:16 -07:00
Brooke Kuhlmann
856f51422a Updated troubleshooting documentation
Focuses on issues experienced related to the macOS Big Sur upgrade.
2021-01-03 14:31:16 -07:00
Brooke Kuhlmann
433ad04028 Updated boot disk instructions for main disk format
Necessary because installation of Big Sur doesn't seem to like password
protected APFS drives. Disk encryption will have to happen after
installation via FileVault.
2021-01-03 14:31:15 -07:00
Brooke Kuhlmann
605190577f Added version release notes 2020-12-30 10:31:46 -07:00
Brooke Kuhlmann
c9c7f46e4a Updated to Git Lint 2.0.0
Supports Ruby 3.0.0.

[Details](https://www.alchemists.io/projects/git-lint/changes.html).
2020-12-29 19:33:36 -07:00
Brooke Kuhlmann
f8a779e926 Updated to Ruby 3.0.0
Includes temporary disablement of gem dependencies that require
updating to Ruby 3.0.0 first.

[Details](https://chl.li/LdWrE).
2020-12-29 10:35:38 -07:00
Brooke Kuhlmann
e6f991baca Added Circle CI explicit Bundle install configuration
Due to fixing the `vendor/bundle` path earlier (see previous commit),
we need to be explicit with the installation of gems now.
2020-12-20 07:15:38 -07:00
Brooke Kuhlmann
ae6ab46fa7 Fixed Circle CI configuration for Bundler config path
Prevents the following deprecation warning:

    [DEPRECATED] The `--path` flag is deprecated because it relies on
    being remembered across bundler invocations, which bundler will no
    longer do in future versions. Instead please use `bundle config set
    path 'vendor/bundle'`, and stop using this flag.
2020-12-19 17:10:44 -07:00
Brooke Kuhlmann
45a6c5d1b0 Added version release notes 2020-11-15 07:38:09 -07:00
Brooke Kuhlmann
1bb6ef39a5 Added macOS Big Sur support
Necessary to support the latest macOS release.
2020-11-15 07:35:58 -07:00
Brooke Kuhlmann
1416aa2f0a Updated to Git Lint 1.3.0
[Changes](https://www.alchemists.io/projects/git-lint/changes.html).
2020-11-14 17:37:33 -07:00
Brooke Kuhlmann
b6cddae599 Updated project documentation to conform to Rubysmith template
Necessary to match consistency used by the
[Rubysmith](https://www.alchemists.io/projects/rubysmith) when
building/maintaining projects.
2020-10-13 20:07:16 -06:00
Brooke Kuhlmann
e533bf04be Updated to Ruby 2.7.2
Fixes a WEBrick security flaw but also disables deprecation warnings by
default which is sad to see. We'll have to enable these ourselves if we
want to have an early warning sign of future breaking changes. 😢

[Release Notes](https://chl.li/lLaOn)
2020-10-03 08:27:07 -06:00
Brooke Kuhlmann
5455a76d14 Added version release notes 2020-09-12 10:11:23 -06:00
Brooke Kuhlmann
5569fdb345 Refactored utility basename and extension utilities
Minor cleanup to the method names used for less typing.
2020-09-12 09:58:53 -06:00
Brooke Kuhlmann
8f2173c938 Removed unnecessary verifier code comments
These were not adding much value so are safe to remove.
2020-09-12 09:51:40 -06:00
Brooke Kuhlmann
4f1ed26934 Removed Homebrew Mecurial formula verification check
No longer necessary as Mecurial isn't used or required by any
applications in the macOS Configuration project.
2020-09-12 09:45:27 -06:00
Brooke Kuhlmann
b7c89266f6 Fixed Homebrew cask verifier deprecation warning
Resolves the following warning when using Homebrew 2.5.0:

    Warning: Calling brew cask list is deprecated! Use brew list

Removed conditional checks for the Skitch, Witch, and OpenEmu
applications since they are no longer supported.
2020-09-12 09:45:27 -06:00
Brooke Kuhlmann
09025fd976 Added version release notes 2020-07-22 20:15:48 -06:00
Brooke Kuhlmann
a97de70b65 Updated README screencast cover to SVG format
Replaces PNG in favor of SVG for faster loading and smaller memory
footprint.
2020-07-16 19:15:37 -06:00
Brooke Kuhlmann
1d75357a18 Fixed project requirements
Links were updated and version information was dropped in order to
specify the bare minimum requirements and reduce situations where the
documentation might not always be up-to-date with the *exact* version
being used.
2020-06-20 08:18:46 -06:00
Brooke Kuhlmann
3c78a1cbf0 Refactored Rakefile requirements
Turns out the rescue block wasn't providing a lot of additional aid as
the Bundler and Rake errors are sufficient. By removing this block, the
error output remains clear and improves readability.
2020-06-18 07:14:35 -06:00
Brooke Kuhlmann
3158d024df Updated to Git Lint 1.0.0
It is necessary to drop Git Cop because it has been deprecated. [Git
Lint](https://www.alchemists.io/projects/git-lint) is the new offical
gem for analyzing Git commit quality.
2020-06-13 15:47:00 -06:00
Brooke Kuhlmann
62295d0851 Updated GitHub templates
Provides more clarity on the format desired when opening up an issue or
a pull request. The order of sections was rearranged to focus on the
*why* and *what* of the root issue.

Optional sections remain encouraged but are not required.
2020-06-13 09:24:27 -06:00
Brooke Kuhlmann
34f7dad25d Fixed screencast image URL
The URL was being built incorrectly originally but is now fixed.
2020-04-04 15:09:07 -06:00
Brooke Kuhlmann
e8101bbb3b Updated README screencast URL
Necessary to point to new URL which doesn't force the HTML format (will
provide more flexibility in the future).
2020-04-03 11:40:07 -06:00
Brooke Kuhlmann
3f9eaf969d Updated README credit URL
Necessary to pick up new author profile URL.
2020-04-03 11:32:44 -06:00
16 changed files with 154 additions and 159 deletions

View File

@@ -1,11 +1,14 @@
## Overview
<!-- Required. Describe, in detail, the behavior experienced and what is desired. -->
## Steps to Recreate
<!-- Optional. List exact steps (numbered list) to reproduce errant behavior. Delete if unused. -->
<!-- Required. Describe, briefly, the behavior experienced. -->
## Screenshots/Screencasts
<!-- Optional. Attach screenshot/screencast(s) that demo the behavior. Delete if unused. -->
<!-- Optional. Attach screenshot(s) and/or screencast(s) that demo the behavior. -->
## Steps to Recreate
<!-- Required. List exact steps (numbered list) to reproduce errant behavior. -->
## Desired Behavior
<!-- Required. Describe the behavior you'd like to see or your idea of a proposed solution. -->
## Environment
<!-- Optional. What is your operating system, software version(s), etc. Delete if unused. -->
<!-- Required. What is your operating system, software version(s), etc. -->

View File

@@ -1,11 +1,11 @@
## Overview
<!-- Required. Why is this important/necessary? -->
## Details
<!-- Optional. List the key features/highlights as bullet points. Delete if unused. -->
## Notes
<!-- Optional. List additional notes/references as bullet points. Delete if unused. -->
<!-- Required. Why is this important/necessary and what is the overarching architecture. -->
## Screenshots/Screencasts
<!-- Optional. Provide supporting image/video. Delete if unused. -->
<!-- Optional. Provide supporting image/video. -->
## Details
<!-- Optional. List the key features/highlights as bullet points. -->
## Notes
<!-- Optional. List additional notes/references as bullet points. -->

View File

@@ -1 +1 @@
2.7.1
3.0.0

View File

@@ -1,15 +1,59 @@
= Changes
== 11.1.1 (2021-01-10)
* Fixed brew formulae list error - Brooke Kuhlmann
* Updated boot disk recovery documentation - Brooke Kuhlmann
== 11.1.0 (2021-01-03)
* Added caffeination to restore process - Brooke Kuhlmann
* Updated boot disk instructions for main disk format - Brooke Kuhlmann
* Updated troubleshooting documentation - Brooke Kuhlmann
* Removed README Startup Security Utility documentation - Brooke Kuhlmann
== 11.0.0 (2020-12-30)
* Fixed Circle CI configuration for Bundler config path - Brooke Kuhlmann
* Added Circle CI explicit Bundle install configuration - Brooke Kuhlmann
* Updated to Git Lint 2.0.0 - Brooke Kuhlmann
* Updated to Ruby 3.0.0 - Brooke Kuhlmann
== 10.0.0 (2020-11-15)
* Added macOS Big Sur support
* Updated project documentation to conform to Rubysmith template
* Updated to Git Lint 1.3.0
* Updated to Ruby 2.7.2
== 9.0.0 (2020-09-12)
* Fixed Homebrew cask verifier deprecation warning
* Removed Homebrew Mecurial formula verification check
* Removed unnecessary verifier code comments
* Refactored utility basename and extension utilities
== 8.2.0 (2020-07-22)
* Fixed project requirements
* Fixed screencast image URL
* Updated GitHub templates
* Updated README credit URL
* Updated README screencast URL
* Updated README screencast cover to SVG format
* Updated to Git Lint 1.0.0
* Refactored Rakefile requirements
== 8.1.0 (2020-04-01)
- Added README production and development setup instructions
- Updated Circle CI build label
- Updated README screencast to use larger image
- Updated documentation to ASCII Doc format
- Updated to Code of Conduct 2.0.0
- Updated to Git Cop 4.0.0
- Updated to Ruby 2.7.1
- Removed README images
* Added README production and development setup instructions
* Updated Circle CI build label
* Updated README screencast to use larger image
* Updated documentation to ASCII Doc format
* Updated to Code of Conduct 2.0.0
* Updated to Git Cop 4.0.0
* Updated to Ruby 2.7.1
* Removed README images
== 8.0.1 (2020-01-01)

View File

@@ -51,7 +51,8 @@ an appointed representative at an online or offline event.
== Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
leaders responsible for enforcement at link:mailto:brooke@alchemists.io?subject=Conduct[Alchemists].
leaders responsible for enforcement at link:mailto:brooke@alchemists.io?subject=Conduct[Brooke Kuhlmann].
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any
@@ -102,7 +103,7 @@ disparagement of classes of individuals.
This Code of Conduct is adapted from the
link:https://www.contributor-covenant.org/version/2/0/code_of_conduct.html[Contributor Covenant,
version 2.0].
Version 2.0].
Community Impact Guidelines were inspired by link:https://github.com/mozilla/diversity[Mozilla's
code of conduct enforcement ladder].

View File

@@ -3,4 +3,4 @@
source "https://rubygems.org"
gem "rake", "~> 13.0"
gem "git-cop", "~> 4.0"
gem "git-lint", "~> 2.0"

View File

@@ -150,7 +150,7 @@ additional liability.
END OF TERMS AND CONDITIONS
Copyright link:https://www.alchemists.io[Alchemists].
Copyright 2016 link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
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 link:https://www.apache.org/licenses/LICENSE-2.0[copy]

View File

@@ -16,10 +16,10 @@ Config_ project is an opinionated configuration which meets the needs of my deve
but is also meant to serve as an example and guide for building your own personalized setup. Here is
how the two projects are meant to be used:
* *macOS* (this project) - The foundation framework for building customizated macOS machine setups.
* *macOS* (this project) - The foundational framework for building custom macOS machine setups.
* *link:https://www.alchemists.io/projects/mac_os-config[macOS Configuration]* - The layer on top of
this _macOS_ project which defines a custom machine setup and base implementation. The project is
meant to be forked for as many custom machine setups as needed.
this _macOS_ project which defines a custom machine implementation. The project is meant to be
forked for as many custom machine setups as needed.
toc::[]
@@ -41,35 +41,23 @@ toc::[]
== Screencast
[link=https://www.alchemists.io/screencasts/mac_o_s.html]
image::https://www.alchemists.io/images/screencasts/mac_o_s/cover-original.png[Screencast,role=focal_point]
[link=https://www.alchemists.io/screencasts/mac_os]
image::https://www.alchemists.io/images/screencasts/mac_os/cover.svg[Screencast,600,240,role=focal_point]
== Requirements
. https://www.apple.com/macos/catalina[macOS Catalina] (with latest software updates applied)
. https://developer.apple.com/xcode[Xcode] (with accepted license agreement)
. link:https://www.apple.com/macos/big-sur[macOS Big Sur]
. link:https://developer.apple.com/xcode[Xcode]
== Setup
=== Production
To install, run:
[source,bash]
----
git clone https://github.com/bkuhlmann/mac_os.git
cd mac_os
git checkout 8.1.0
----
=== Development
To contribute, run:
[source,bash]
----
git clone https://github.com/bkuhlmann/mac_os.git
cd mac_os
git checkout 11.1.1
----
== Usage
@@ -140,43 +128,17 @@ macOS Boot Disk Usage:
2. Reboot the machine.
3. Hold down the OPTION key before the Apple logo appears.
4. Select the USB boot disk from the menu.
5. Use Disk Utility to format the machine's drive as "APFS (Encrypted)".
6. Install the new operating system.
5. Use Disk Utility to delete and/or erase the hard drive including associated partitions.
6. Use Disk Utility to create a single "APFS" drive as a "GUID Partition Table".
7. Install the new operating system.
macOS Reinstall:
1. Click the Apple icon from the operating system main menu.
2. Select the "Restart..." menu option.
3. Hold down the COMMAND+R keys before the Apple logo appears.
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.
macOS Boot Disk Recovery:
1. Start/restart the machine.
2. Hold down the COMMAND+R keys before the Apple logo appears.
3. Wait for the macOS installer to load from the recovery partition.
4. 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).
=== https://support.apple.com/en-us/HT208198[Startup Security Utility]
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,
youll 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.
Youll 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
All executable scripts can be found in the `bin` folder:
@@ -206,6 +168,13 @@ link:https://www.alchemists.io/projects/mac_os-config[macOS Config] project for
== Troubleshooting
* When using link:https://pi-hole.net[Pi-hole], you might need to temporarily disable prior to
upgrading as you might experience various errors with Apple not being able to detect an internet
connection which prevents the installer from working.
* When using the boot disk and the installer fails in some catestrophic manner, reboot the machine
into recovery mode (i.e. `COMMAND + R`) to download and install the last operating system used.
Alternatively, you can also use `COMMAND + OPTION + R` to attemp to download the latest operating
system.
* When using the boot disk, you might experience a situation where you see a black screen with a
white circle and diagonal line running through it. This means macOS lost or cant find the boot
disk for some reason. To correct this, shut down and boot up the system again while holding down
@@ -213,13 +182,16 @@ link:https://www.alchemists.io/projects/mac_os-config[macOS Config] project for
happen a few times before releasing the keys. This will clear the system NVRAM/PRAM. At this point
you can shut down and restart the system following the boot disk instructions (the boot disk will
be recognized now).
* Sometimes, when installing XCode development tools (i.e. the `t` option), not all of the macOS
headers will be installed. This can cause issues with compiling and building native packages. For
example: `fatal error: 'stdio.h' file not found`. This can happen due to an intermittent bug with
the XCode installer. To fix this, youll need to install this package:
`/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg`. Depending on
your system, the version might differ, so look for a `*.pkg` in the
`/Library/Developer/CommandLineTools/Packages` folder.
== Development
To contribute, run:
[source,bash]
----
git clone https://github.com/bkuhlmann/mac_os.git
cd mac_os
----
== Versioning
@@ -248,4 +220,4 @@ Read link:CHANGES.adoc[CHANGES] for details.
== Credits
Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann.html[Brooke Kuhlmann].
Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].

View File

@@ -1,9 +1,5 @@
# frozen_string_literal: true
begin
require "git/cop/rake/setup"
rescue LoadError => error
puts error.message
end
require "git/lint/rake/setup"
task default: :git_cop
task default: :git_lint

View File

@@ -11,14 +11,14 @@ printf " 1. Insert the USB boot disk into the machine to be upgraded.\n"
printf " 2. Reboot the machine.\n"
printf " 3. Hold down the OPTION key before the Apple logo appears.\n"
printf " 4. Select the USB boot disk from the menu.\n"
printf " 5. Use Disk Utility to format the machine's drive as \"APFS (Encrypted)\".\n"
printf " 6. Install the new operating system.\n"
printf "\nmacOS Reinstall:\n"
printf " 1. Click the Apple icon from the operating system main menu.\n"
printf " 2. Select the \"Restart...\" menu option.\n"
printf " 3. Hold down the COMMAND+R keys before the Apple logo appears.\n"
printf " 4. Wait for the macOS installer to load from the recovery partition.\n"
printf " 5. Use the dialog options to launch Disk Utility, reinstall the system, etc.\n"
printf " 5. Use Disk Utility to delete and/or erase the hard drive including associated partitions.\n"
printf " 6. Use Disk Utility to create a single \"APFS\" drive as a \"GUID Partition Table\".\n"
printf " 7. Install the new operating system.\n"
printf "\nmacOS Boot Disk Recovery:\n"
printf " 1. Start/restart the machine.\n"
printf " 2. Hold down the COMMAND+R keys before the Apple logo appears.\n"
printf " 3. Wait for the macOS installer to load from the recovery partition.\n"
printf " 4. Use the dialog options to launch Disk Utility, reinstall the system, etc.\n"
printf "\nCreating macOS boot disk...\n"

View File

@@ -24,9 +24,9 @@ jobs:
- run:
name: Ruby Install
command: |
curl https://cache.ruby-lang.org/pub/ruby/${CI_RUBY_VERSION::-2}/ruby-$CI_RUBY_VERSION.tar.bz2 > ../ruby-$CI_RUBY_VERSION.tar.gz
cd ..
tar --extract --bzip2 --verbose --file ruby-$CI_RUBY_VERSION.tar.gz
curl https://cache.ruby-lang.org/pub/ruby/${CI_RUBY_VERSION::-2}/ruby-$CI_RUBY_VERSION.tar.gz > ruby-$CI_RUBY_VERSION.tar.gz
tar --extract --gzip --verbose --file ruby-$CI_RUBY_VERSION.tar.gz
cd ruby-$CI_RUBY_VERSION
./configure
make
@@ -48,7 +48,8 @@ jobs:
name: Bundler Install
command: |
gem update --system
bundle install --path vendor/bundle
bundle config set path "vendor/bundle"
bundle install
- type: cache-save
name: Bundler Store

View File

@@ -136,7 +136,7 @@ export -f install_program
# Parameters: $1 (required) - Repository URL, $2 (required) - Install path, $3 (optional) - Git clone options.
install_git_app() {
local repository_url="$1"
local app_name=$(get_file_name "$2")
local app_name=$(get_basename "$2")
local install_path="$2"
local options="--quiet"
@@ -175,7 +175,7 @@ export -f install_git_project
# Parameters: $1 (required) - URL, $2 (required) - Install path.
install_file() {
local file_url="$1"
local file_name=$(get_file_name "$1")
local file_name=$(get_basename "$1")
local install_path="$2"
if [[ ! -e "$install_path" ]]; then
@@ -206,7 +206,7 @@ export -f download_file
# Parameters: $1 (required) - Application source path, $2 (required) - Application name.
install_app() {
local install_root=$(get_install_root "$2")
local file_extension=$(get_file_extension "$2")
local file_extension=$(get_extension "$2")
printf "Installing: $install_root/$2...\n"

View File

@@ -39,6 +39,7 @@ process_option() {
bin/setup_software
clean_work_path;;
'R')
caffeinate_machine
bin/restore_backup;;
'c')
verify_homebrew_formulas

View File

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

View File

@@ -2,6 +2,19 @@
# Defines general utility functions.
# Caffeinate machine.
caffeinate_machine() {
local pid=$(pgrep -x caffeinate)
if [[ -n "$pid" ]]; then
printf "Machine is already caffeinated!\n"
else
caffeinate -s -u -d -i -t 3153600000 > /dev/null &
printf "Machine caffeinated.\n"
fi
}
export -f caffeinate_machine
# Answers the full install path (including file name) for file name.
# Parameters: $1 (required) - The file name.
get_install_path() {
@@ -17,24 +30,11 @@ clean_work_path() {
}
export -f clean_work_path
# Caffeinate machine.
caffeinate_machine() {
local pid=$(pgrep -x caffeinate)
if [[ -n "$pid" ]]; then
printf "Whoa, tweaker, machine is already caffeinated!\n"
else
caffeinate -s -u -d -i -t 3153600000 > /dev/null &
printf "Machine caffeinated.\n"
fi
}
export -f caffeinate_machine
# Answers the root install path for file name.
# Parameters: $1 (required) - The file name.
get_install_root() {
local file_name="$1"
local file_extension=$(get_file_extension "$file_name")
local file_extension=$(get_extension "$file_name")
# Dynamically build the install path based on file extension.
case $file_extension in
@@ -52,10 +52,17 @@ get_install_root() {
}
export -f get_install_root
# Answers the file or directory basename.
# Parameters: $1 (required) - The file path.
get_basename() {
printf "${1##*/}" # Answers file or directory name.
}
export -f get_basename
# Answers the file extension.
# Parameters: $1 (required) - The file name.
get_file_extension() {
local name=$(get_file_name "$1")
get_extension() {
local name=$(get_basename "$1")
local extension="${1##*.}" # Excludes dot.
if [[ "$name" == "$extension" ]]; then
@@ -64,11 +71,4 @@ get_file_extension() {
printf "$extension"
fi
}
export -f get_file_extension
# Answers the file name.
# Parameters: $1 (required) - The file path.
get_file_name() {
printf "${1##*/}" # Answers file or directory name.
}
export -f get_file_name
export -f get_extension

View File

@@ -6,10 +6,9 @@
verify_homebrew_formulas() {
printf "Checking Homebrew formulas...\n"
local applications="$(brew list)"
local applications="$(brew list --formulae)"
while read line; do
# Skip blank or comment lines.
if [[ "$line" == "brew install"* ]]; then
local application=$(printf "$line" | awk '{print $3}')
@@ -18,11 +17,6 @@ verify_homebrew_formulas() {
application="gnupg"
fi
# Exception: "hg" is the binary but is listed as "mercurial".
if [[ "$application" == "hg" ]]; then
application="mercurial"
fi
verify_listed_application "$application" "${applications[*]}"
fi
done < "$MAC_OS_CONFIG_PATH/bin/install_homebrew_formulas"
@@ -35,23 +29,11 @@ export -f verify_homebrew_formulas
verify_homebrew_casks() {
printf "\nChecking Homebrew casks...\n"
local applications="$(brew cask list)"
local applications="$(brew list --casks)"
while read line; do
# Skip blank or comment lines.
if [[ "$line" == "brew cask install"* ]]; then
local application=$(printf "$line" | awk '{print $4}')
# Skip: Only necessary for the purpose of licensing system preference.
if [[ "$application" == "witch" ]]; then
continue
fi
# Skip: Bug with Homebrew Cask as these apps never show up as installed.
if [[ "$application" == "skitch" || "$application" == "openemu" ]]; then
continue
fi
verify_listed_application "$application" "${applications[*]}"
fi
done < "$MAC_OS_CONFIG_PATH/bin/install_homebrew_casks"
@@ -67,7 +49,6 @@ verify_app_store_applications() {
local applications="$(mas list)"
while read line; do
# Skip blank or comment lines.
if [[ "$line" == "mas install"* ]]; then
local application=$(printf "$line" | awk '{print $3}')
verify_listed_application "$application" "${applications[*]}"
@@ -99,7 +80,6 @@ verify_applications() {
# For each application name, check to see if the application is installed. Otherwise, skip.
for name in $file_names; do
# Pass the key value to verfication.
verify_application "${!name}"
done
@@ -111,8 +91,6 @@ export -f verify_applications
# Parameters: $1 (required) - The file name.
verify_application() {
local file_name="$1"
# Display the missing install if not found.
local install_path=$(get_install_path "$file_name")
if [[ ! -e "$install_path" ]]; then
@@ -143,7 +121,6 @@ export -f verify_extensions
verify_path() {
local path="$1"
# Display the missing path if not found.
if [[ ! -e "$path" ]]; then
printf " - Missing: $path\n"
fi