Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- clear
- echo "Welcome to Language Packs Removal!"
- echo "Written by Justin Blanchard, @pandaa on ifans.com"
- echo "Let's Get Started!"
- sleep 1
- echo "Making Temporary Directories..."
- sleep 1
- mkdir -p '/var/stash/Language Packs'
- mkdir -p '/tmp/Language Packs'
- if [ -f '/var/stash/Language Packs/Language Packs.deb' ]
- then
- dpkg-deb -x '/var/stash/Language Packs/Language Packs.deb' '/tmp/Language Packs'
- else
- sleep 1
- fi
- echo "Copying Language Packs to Temporary Directory..."
- sleep 1
- find / -type d \
- -name "*.lproj" -not -iname "en*.lproj" -and -not -iname "ru*.lproj" -not -iwholename "/private/var/tmp*" \
- -exec '/bin/cp' -pr --parents '{}' '/tmp/Language Packs' \;
- find / -type d \
- -name "en_GB.lproj" -not -iwholename "/private/var/tmp*" \
- -exec '/bin/cp' -pr --parents '{}' '/tmp/Language Packs' \;
- echo "Setting Permissions..."
- chown -R root:wheel '/tmp/Language Packs'
- chmod -R 0775 '/tmp/Language Packs'
- sleep 2
- echo "Preparing Package..."
- sleep 1
- echo "Building Debian Archive..."
- mkdir -p '/tmp/Language Packs/DEBIAN'
- echo "
- Package: com.myrepospace.LanguagePacksRemoval
- Name: Language Packs Removal
- Version: 1.0.3
- Architecture: iphoneos-arm
- Description: Removes unneeded language packs, backs up in a .deb.
- Homepage: http://www.myrepospace.com
- Maintainer: pandaa
- Author: pandaa < pandaa_ifans@hotmail.com >
- Section: pandaa - MyRepoSpace.com
- " >> '/tmp/Language Packs/DEBIAN/control'
- dpkg-deb -b '/tmp/Language Packs'
- mv '/tmp/Language Packs.deb' '/var/stash/Language Packs/Language Packs.deb'
- sleep 2
- echo "Removing Temporary Files... (may take a few minutes)"
- rm -rf '/tmp/Language Packs'
- find / -type d \
- -name "*.lproj" -not -iname "en*.lproj" -and -not -iname "ru*.lproj" \
- -exec /bin/rm -rf '{}' \;
- find / -type d \
- -name "en_GB.lproj" \
- -exec /bin/rm -rf '{}' \;
- sleep 2
- echo "Language Packs Saved To /var/stash/Language Packs/Language Packs.deb"
- sleep 1
- echo "Thank You For Using This Tool!"
- echo "Be Sure to Thank Me on ifans.com If You Liked This!"
- sleep 2
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement