Skip to content

Commit

Permalink
Added the posinstall script
Browse files Browse the repository at this point in the history
Added the posinstall script that clears AppStore's and iTunesStore's caches upon installation
  • Loading branch information
ObscureMosquito authored Sep 7, 2023
1 parent 1ae10f2 commit 68ca54e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions layout/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Define the folders to be deleted
folders=(
"/var/mobile/Library/Caches/com.apple.AppStore"
"/var/mobile/Library/Caches/com.apple.iTunesStore"
"/var/mobile/Library/Caches/com.apple.itunesstored"
)

# Iterate over the folders and delete them if they exist
for folder in "${folders[@]}"; do
if [ -d "$folder" ]; then
echo "Deleting folder: $folder"
rm -rf "$folder"
else
echo "Folder not found: $folder"
fi
done

# Your post-init script continues here
echo "Post-init script completed."

0 comments on commit 68ca54e

Please sign in to comment.