mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 01:23:57 -07:00
fixup
This commit is contained in:
parent
c0103e0378
commit
49b8f08dda
1 changed files with 3 additions and 2 deletions
|
|
@ -9,14 +9,15 @@ arch=$(uname -m)
|
||||||
nproc=$(sysctl -n hw.ncpu)
|
nproc=$(sysctl -n hw.ncpu)
|
||||||
|
|
||||||
function thin() {
|
function thin() {
|
||||||
local libfile=$0
|
local libfile=$1
|
||||||
if file -b --mime-type "$libfile" | grep -q "application/x-mach-binary"; then
|
if [[ $(file -b --mime-type "$libfile") == application/x-mach-binary ]]; then
|
||||||
echo "Processing $libfile"
|
echo "Processing $libfile"
|
||||||
lipo "$libfile" -thin "$arch" -output "$libfile"
|
lipo "$libfile" -thin "$arch" -output "$libfile"
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
export -f thin # export to allow use in xargs
|
export -f thin # export to allow use in xargs
|
||||||
|
export arch
|
||||||
|
|
||||||
echo "::group::Thinning Qt libraries to $arch using $nproc cores"
|
echo "::group::Thinning Qt libraries to $arch using $nproc cores"
|
||||||
find "$GITHUB_WORKSPACE/Qt" -type f -print0 | xargs -0 -n1 -P"$nproc" -I{} bash -c "thin '{}'"
|
find "$GITHUB_WORKSPACE/Qt" -type f -print0 | xargs -0 -n1 -P"$nproc" -I{} bash -c "thin '{}'"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue