mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
36d40d99d7
Partial #638 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
37 lines
722 B
Bash
Executable file
37 lines
722 B
Bash
Executable file
#!/bin/bash -eu
|
|
#
|
|
# script/bootstrap
|
|
# mas
|
|
#
|
|
# Installs development dependencies and builds project dependencies.
|
|
#
|
|
|
|
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
|
|
|
|
function usage {
|
|
echo 'Usage: bootstrap [-f]' >&2
|
|
echo ' -f option enables frozen mode' >&2
|
|
exit 1
|
|
}
|
|
|
|
# Detect presence of `-f` frozen option
|
|
while getopts 'f' opt; do
|
|
case "${opt}" in
|
|
f)
|
|
frozen='--no-lock --no-upgrade'
|
|
;;
|
|
*)
|
|
usage
|
|
;;
|
|
esac
|
|
done
|
|
|
|
printf $'==> 👢 Bootstrapping mas %s\n' "$(script/version)"
|
|
|
|
# shellcheck disable=SC2086
|
|
brew bundle install ${frozen} --verbose
|