mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 12:33:08 +00:00
d3066609d5
Fixes install script when executed in sandbox ==> script/install /opt/homebrew/Cellar/mas/1.8.7-beta.2 script/install: line 16: brew: command not found
33 lines
705 B
Bash
Executable file
33 lines
705 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
|
|
#
|
|
|
|
ARCH=$(uname -m)
|
|
RELEASE=.build/${ARCH}-apple-macosx/release
|
|
MAS_VERSION=$(script/version)
|
|
PREFIX=/usr/local
|
|
|
|
while test -n "$1"; do
|
|
if [[ "$1" == '--universal' ]]; then
|
|
ARCH=universal
|
|
RELEASE=.build/apple/Products/Release
|
|
else
|
|
# Override default prefix path with optional arg
|
|
PREFIX="$1"
|
|
fi
|
|
|
|
shift
|
|
done
|
|
|
|
echo "==> 📲 Installing mas ($MAS_VERSION) for $ARCH to $PREFIX"
|
|
ditto -v \
|
|
"$RELEASE/mas" \
|
|
"$PREFIX/bin/mas"
|