Skip to content

Commit c618319

Browse files
committed
Fixup make-universal file processing
1 parent 1fe4c9c commit c618319

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/macos/make-universal.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ mkdir -p $INSTALLDIR
1010
cp -r $INSTALLDIR-arm64/* $INSTALLDIR
1111
touch $INSTALLDIR/.keep
1212

13-
FILES=$(find $INSTALLDIR -type f)
13+
EXES=$(find $INSTALLDIR -type f -perm -u+x)
14+
LIBS=$(find $INSTALLDIR -type f -name "*.dylib")
15+
FILES="$EXES $LIBS"
1416
echo "Files: $FILES"
1517
while IFS= read -r file; do
1618
file_arm64=$(sed "s|$INSTALLDIR|$INSTALLDIR-arm64|" <<< $file)
1719
file_x86_64=$(sed "s|$INSTALLDIR|$INSTALLDIR-x86_64|" <<< $file)
1820
if file $file | grep "Mach-O 64-bit executable" > /dev/null; then
1921
echo "Processing executable: $file $file_x86_64 $file_arm64"
2022
lipo -create -output $file $file_x86_64 $file_arm64
21-
elif file $file | grep "Mach-O 64-bit dynamic library" > /dev/null; then
23+
elif file $file | grep "Mach-O 64-bit dynamically linked shared library" > /dev/null; then
2224
echo "Processing dynamic library: $file $file_x86_64 $file_arm64"
2325
lipo -create -output $file $file_x86_64 $file_arm64
2426
fi

0 commit comments

Comments
 (0)