mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 11:33:13 +00:00
27 lines
598 B
Bash
Executable file
27 lines
598 B
Bash
Executable file
#!/bin/bash -e
|
|
#
|
|
# script/install
|
|
# mas
|
|
#
|
|
# Installs mas into PREFIX.
|
|
#
|
|
# NOTE: This script is called by the mas Homebrew formula so it has only system
|
|
# dependencies aside from Swift.
|
|
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/mas.rb
|
|
#
|
|
|
|
VERSION=$(script/version)
|
|
|
|
# Override default prefix path with optional 1st arg
|
|
if test -n "$1"; then
|
|
PREFIX="$1"
|
|
elif [[ $(uname -m) == 'arm64' ]]; then
|
|
PREFIX=/opt/homebrew
|
|
else
|
|
PREFIX=/usr/local
|
|
fi
|
|
|
|
echo "==> 📲 Installing mas ($VERSION) for $ARCH to $PREFIX"
|
|
ditto -v \
|
|
".build/apple/Products/Release/mas" \
|
|
"$PREFIX/bin/"
|