mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
©️ Use ditto to copy files
This commit is contained in:
parent
7180928859
commit
715bde70b3
2 changed files with 8 additions and 13 deletions
|
@ -31,7 +31,7 @@ class Mas < Formula
|
|||
"OBJROOT=#{buildpath.realpath}",
|
||||
"SYMROOT=#{buildpath.realpath}"
|
||||
|
||||
system "script/install"
|
||||
system "script/install", prefix
|
||||
|
||||
bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
|
||||
end
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
PREFIX=/usr/local
|
||||
INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst
|
||||
|
||||
# Override default prefix path with optional 1st arg
|
||||
if test -n "$1"; then
|
||||
PREFIX="$1"
|
||||
fi
|
||||
|
@ -11,16 +12,10 @@ echo "==> 📲 Installing mas to $PREFIX"
|
|||
|
||||
xcodebuild install
|
||||
|
||||
pushd "$INSTALL_TEMPORARY_FOLDER"
|
||||
ditto -v \
|
||||
"$INSTALL_TEMPORARY_FOLDER/Frameworks" \
|
||||
"$PREFIX/Frameworks"
|
||||
|
||||
mkdir -p "$PREFIX/Frameworks/"
|
||||
|
||||
mv -v \
|
||||
Frameworks/MasKit.framework \
|
||||
"$PREFIX/Frameworks/"
|
||||
|
||||
mv -f \
|
||||
bin/mas \
|
||||
"$PREFIX/bin/"
|
||||
|
||||
popd
|
||||
ditto -v \
|
||||
"$INSTALL_TEMPORARY_FOLDER/bin" \
|
||||
"$PREFIX/bin"
|
||||
|
|
Loading…
Reference in a new issue