mirror of
https://github.com/mas-cli/mas
synced 2024-11-25 04:50:24 +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}",
|
"OBJROOT=#{buildpath.realpath}",
|
||||||
"SYMROOT=#{buildpath.realpath}"
|
"SYMROOT=#{buildpath.realpath}"
|
||||||
|
|
||||||
system "script/install"
|
system "script/install", prefix
|
||||||
|
|
||||||
bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
|
bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst
|
INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst
|
||||||
|
|
||||||
|
# Override default prefix path with optional 1st arg
|
||||||
if test -n "$1"; then
|
if test -n "$1"; then
|
||||||
PREFIX="$1"
|
PREFIX="$1"
|
||||||
fi
|
fi
|
||||||
|
@ -11,16 +12,10 @@ echo "==> 📲 Installing mas to $PREFIX"
|
||||||
|
|
||||||
xcodebuild install
|
xcodebuild install
|
||||||
|
|
||||||
pushd "$INSTALL_TEMPORARY_FOLDER"
|
ditto -v \
|
||||||
|
"$INSTALL_TEMPORARY_FOLDER/Frameworks" \
|
||||||
|
"$PREFIX/Frameworks"
|
||||||
|
|
||||||
mkdir -p "$PREFIX/Frameworks/"
|
ditto -v \
|
||||||
|
"$INSTALL_TEMPORARY_FOLDER/bin" \
|
||||||
mv -v \
|
"$PREFIX/bin"
|
||||||
Frameworks/MasKit.framework \
|
|
||||||
"$PREFIX/Frameworks/"
|
|
||||||
|
|
||||||
mv -f \
|
|
||||||
bin/mas \
|
|
||||||
"$PREFIX/bin/"
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
Loading…
Reference in a new issue