Add simple install script for homebrew

This commit is contained in:
Ben Chatelain 2018-10-17 15:43:02 -06:00
parent 55aa25193b
commit d42010ba9a
2 changed files with 20 additions and 1 deletions

View file

@ -31,7 +31,6 @@ class Mas < Formula
"OBJROOT=#{buildpath.realpath}",
"SYMROOT=#{buildpath.realpath}"
system "script/package"
system "script/install"
bash_completion.install "contrib/completion/mas-completion.bash" => "mas"

20
script/install Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash -e
PREFIX=/usr/local
INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst
echo "==> 📲 Installing mas to $PREFIX"
xcodebuild install
pushd "$INSTALL_TEMPORARY_FOLDER"
rsync --archive --delete \
Frameworks/MasKit.framework \
"$PREFIX/Frameworks/"
cp -f \
bin/mas \
"$PREFIX/bin/"
popd