File: check_macos

package info (click to toggle)
obs-source-clone 0.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 492 kB
  • sloc: ansic: 948; makefile: 23; cpp: 16
file content (20 lines) | stat: -rwxr-xr-x 580 bytes parent folder | download | duplicates (41)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
autoload -Uz is-at-least log_info log_error log_status read_codesign

local macos_version=$(sw_vers -productVersion)

log_info 'Checking macOS version...'
if ! is-at-least 11.0 "${macos_version}"; then
  log_error "Minimum required macOS version is 11.0, but running on macOS ${macos_version}"
  return 2
else
  log_status "macOS ${macos_version} is recent"
fi

log_info 'Checking for Homebrew...'
if (( ! ${+commands[brew]} )) {
  log_error 'No Homebrew command found. Please install Homebrew (https://brew.sh)'
  return 2
}

brew bundle --file "${SCRIPT_HOME}/.Brewfile"
rehash