Advertisement
Guest User

iOS удаление лишних языков с бэкапом

a guest
Jan 31st, 2013
922
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.00 KB | None | 0 0
  1. #!/bin/sh
  2. clear
  3. echo "Welcome to Language Packs Removal!"
  4. echo "Written by Justin Blanchard, @pandaa on ifans.com"
  5. echo "Let's Get Started!"
  6. sleep 1
  7. echo "Making Temporary Directories..."
  8. sleep 1
  9. mkdir -p '/var/stash/Language Packs'
  10. mkdir -p '/tmp/Language Packs'
  11. if [ -f '/var/stash/Language Packs/Language Packs.deb' ]
  12. then
  13. dpkg-deb -x '/var/stash/Language Packs/Language Packs.deb' '/tmp/Language Packs'
  14. else
  15. sleep 1
  16. fi
  17. echo "Copying Language Packs to Temporary Directory..."
  18. sleep 1
  19. find / -type d \
  20. -name "*.lproj" -not -iname "en*.lproj" -and -not -iname "ru*.lproj" -not -iwholename "/private/var/tmp*" \
  21. -exec '/bin/cp' -pr --parents  '{}' '/tmp/Language Packs' \;
  22. find / -type d \
  23. -name "en_GB.lproj" -not -iwholename "/private/var/tmp*" \
  24. -exec '/bin/cp' -pr --parents  '{}' '/tmp/Language Packs' \;
  25. echo "Setting Permissions..."
  26. chown -R root:wheel '/tmp/Language Packs'
  27. chmod -R 0775 '/tmp/Language Packs'
  28. sleep 2
  29. echo "Preparing Package..."
  30. sleep 1
  31. echo "Building Debian Archive..."
  32. mkdir -p '/tmp/Language Packs/DEBIAN'
  33. echo "
  34. Package: com.myrepospace.LanguagePacksRemoval
  35. Name: Language Packs Removal
  36. Version: 1.0.3
  37. Architecture: iphoneos-arm
  38. Description: Removes unneeded language packs, backs up in a .deb.
  39. Homepage: http://www.myrepospace.com
  40. Maintainer: pandaa
  41. Author: pandaa < pandaa_ifans@hotmail.com >
  42. Section: pandaa - MyRepoSpace.com
  43.  
  44. " >> '/tmp/Language Packs/DEBIAN/control'
  45. dpkg-deb -b '/tmp/Language Packs'
  46. mv '/tmp/Language Packs.deb' '/var/stash/Language Packs/Language Packs.deb'
  47. sleep 2
  48. echo "Removing Temporary Files... (may take a few minutes)"
  49. rm -rf '/tmp/Language Packs'
  50. find / -type d \
  51. -name "*.lproj" -not -iname "en*.lproj" -and -not -iname "ru*.lproj" \
  52. -exec /bin/rm -rf '{}' \;
  53. find / -type d \
  54. -name "en_GB.lproj" \
  55. -exec /bin/rm -rf '{}' \;
  56. sleep 2
  57. echo "Language Packs Saved To /var/stash/Language Packs/Language Packs.deb"
  58. sleep 1
  59. echo "Thank You For Using This Tool!"
  60. echo "Be Sure to Thank Me on ifans.com If You Liked This!"
  61. sleep 2
  62. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement