Skip to content

Commit bf8a55f

Browse files
committed
Apply fixes.
1 parent 807c126 commit bf8a55f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎MagiskOnWSA/scripts/build.sh‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ fi
685685
# Install Houdini files only for x64 architecture using local files
686686
if [ "$ARCH" = "x64" ]; then
687687
echo "Installing Houdini files from local libhoudini folder (Many Thanks to SupremeGamers)"
688-
HOUDINI_LOCAL_PATH="../libhoudini"
688+
HOUDINI_LOCAL_PATH="$(realpath ../libhoudini)"
689689

690690
# Verify local Houdini files exist
691691
if [ ! -d "$HOUDINI_LOCAL_PATH" ]; then
@@ -767,7 +767,11 @@ if [ "$ARCH" = "x64" ]; then
767767
# Copy all ARM library files from libhoudini/lib64/arm64 to vendor/lib64/arm64
768768
if [ -d "$HOUDINI_LOCAL_PATH/lib64/arm64" ]; then
769769
echo "Copying ARM libraries to vendor/lib64/arm64..."
770-
sudo cp -r "$HOUDINI_LOCAL_PATH/lib64/arm64/"* "$VENDOR_MNT/lib64/arm64/" 2>/dev/null || echo "Warning: No files found in $HOUDINI_LOCAL_PATH/lib64/arm64 or copy failed"
770+
if [ "$(ls -A "$HOUDINI_LOCAL_PATH/lib64/arm64" 2>/dev/null)" ]; then
771+
sudo cp -r "$HOUDINI_LOCAL_PATH/lib64/arm64/"* "$VENDOR_MNT/lib64/arm64/" || echo "Warning: Copy failed for $HOUDINI_LOCAL_PATH/lib64/arm64"
772+
else
773+
echo "Warning: No files found in $HOUDINI_LOCAL_PATH/lib64/arm64"
774+
fi
771775

772776
# Set permissions and ownership for all files in vendor/lib64/arm64
773777
sudo find "$VENDOR_MNT/lib64/arm64" -type f -exec chown root:root {} \; 2>/dev/null || true
@@ -782,7 +786,11 @@ if [ "$ARCH" = "x64" ]; then
782786
# Copy all files from libhoudini/lib/arm to vendor/lib/arm
783787
if [ -d "$HOUDINI_LOCAL_PATH/lib/arm" ]; then
784788
echo "Copying ARM libraries from libhoudini/lib/arm to vendor/lib/arm..."
785-
sudo cp -r "$HOUDINI_LOCAL_PATH/lib/arm/"* "$VENDOR_MNT/lib/arm/" 2>/dev/null || echo "Warning: No files found in $HOUDINI_LOCAL_PATH/lib/arm or copy failed"
789+
if [ "$(ls -A "$HOUDINI_LOCAL_PATH/lib/arm" 2>/dev/null)" ]; then
790+
sudo cp -r "$HOUDINI_LOCAL_PATH/lib/arm/"* "$VENDOR_MNT/lib/arm/" || echo "Warning: Copy failed for $HOUDINI_LOCAL_PATH/lib/arm"
791+
else
792+
echo "Warning: No files found in $HOUDINI_LOCAL_PATH/lib/arm"
793+
fi
786794

787795
# Set permissions and ownership for all files in vendor/lib/arm
788796
sudo find "$VENDOR_MNT/lib/arm" -type f -exec chown root:root {} \; 2>/dev/null || true

0 commit comments

Comments
 (0)