-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the posinstall script that clears AppStore's and iTunesStore's caches upon installation
- Loading branch information
1 parent
1ae10f2
commit 68ca54e
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
|