mas/script/package_install
Ross Goldberg a4b7a64e0d
Use bash '…', $'…', or unquoted word instead of "…" whenever possible.
Partial #638

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2024-11-16 14:48:06 -05:00

26 lines
485 B
Bash
Executable file

#!/bin/bash -e
#
# script/package_install
# mas
#
# Installs the mas distribution package. Requires sudo access.
#
mas_dir="$(readlink -fn "$(dirname "${BASH_SOURCE:-"${0}"}")/..")"
if ! cd -- "${mas_dir}"; then
printf $'Error: Could not cd into mas directory: %s\n' "${mas_dir}" >&2
exit 1
fi
IDENTIFIER=com.mphys.mas-cli
echo '==> 📲 Installing mas'
sudo installer \
-pkg .build/mas.pkg \
-target /
pkgutil --pkg-info "${IDENTIFIER}"
pkgutil --files "${IDENTIFIER}"