fix permissions actually this time i swear

This commit is contained in:
Max 2026-07-09 09:09:31 -05:00
parent b476f1fed5
commit 8c028cf61c
2 changed files with 12 additions and 12 deletions

View file

@ -153,21 +153,21 @@ TOTAL_SIZE=$((STAGING_SIZE + PADDING))
dd if=/dev/zero of="$UNCOMPRESSED_DMG" bs=1 count=0 seek="$TOTAL_SIZE" status=none
mkfs.hfsplus -v "Ryujinx" "$UNCOMPRESSED_DMG"
find "$DMG_FOLDER" -type d -exec chmod 0755 {} +
find "$DMG_FOLDER" -type f -exec chmod 0644 {} +
# Make all the folders first, because libdmg-hfsplus won't make non-existent directories.
find "$DMG_FOLDER" -mindepth 1 -type d | sort | while IFS= read -r src; do
dst="/${src#"$DMG_FOLDER"/}"
dmg-hfsplus "$UNCOMPRESSED_DMG" mkdir "$dst"
dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755
done
# Copy the files over, setting correct permissions.
# Copy the files over, setting correct permissions on the executable.
find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do
dst="/${src#"$DMG_FOLDER"/}"
dmg-hfsplus "$UNCOMPRESSED_DMG" add "$src" "$dst"
if file "$src" | grep -Fqi "Mach-O"; then
dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755
else
dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0644
chmod 0755 "$src"
fi
dmg-hfsplus "$UNCOMPRESSED_DMG" add "$src" "$dst"
done
# Copy the symlink into a folder, then copy the folder over with symlink permissions.

View file

@ -149,21 +149,21 @@ TOTAL_SIZE=$((STAGING_SIZE + PADDING))
dd if=/dev/zero of="$UNCOMPRESSED_DMG" bs=1 count=0 seek="$TOTAL_SIZE" status=none
mkfs.hfsplus -v "Ryujinx" "$UNCOMPRESSED_DMG"
find "$DMG_FOLDER" -type d -exec chmod 0755 {} +
find "$DMG_FOLDER" -type f -exec chmod 0644 {} +
# Make all the folders first, because libdmg-hfsplus won't make non-existent directories.
find "$DMG_FOLDER" -mindepth 1 -type d | sort | while IFS= read -r src; do
dst="/${src#"$DMG_FOLDER"/}"
dmg-hfsplus "$UNCOMPRESSED_DMG" mkdir "$dst"
dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755
done
# Copy the files over, setting correct permissions.
# Copy the files over, setting correct permissions on the executable.
find "$DMG_FOLDER" -mindepth 1 -type f | while IFS= read -r src; do
dst="/${src#"$DMG_FOLDER"/}"
dmg-hfsplus "$UNCOMPRESSED_DMG" add "$src" "$dst"
if file "$src" | grep -Fqi "Mach-O"; then
dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0755
else
dmg-hfsplus "$UNCOMPRESSED_DMG" chmod "$dst" 0644
chmod 0755 "$src"
fi
dmg-hfsplus "$UNCOMPRESSED_DMG" add "$src" "$dst"
done
# Copy the symlink into a folder, then copy the folder over with symlink permissions.