Advertisement
Guest User

unpack_dev_flash.sh

a guest
Nov 16th, 2011
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.09 KB | None | 0 0
  1. TOOLS=/Users/wargio/.ps3tools
  2. echo ""
  3. echo "Wargio's dev_flash & dev_flash3 extractor v0.2 (For OSX)"
  4. echo "Just for 3.56+ PUPs"
  5. echo ""
  6.  
  7. if [ $# -eq 1 ]; then
  8.     echo "Extracting PUP.."
  9.     $TOOLS/pupunpack $1 PUP_EX >> logs.txt
  10.     rm -rf logs.txt
  11.     cd PUP_EX
  12.     mkdir update_files
  13.     cd update_files
  14.     tar -xf ../update_files.tar
  15.     echo "Working now on dev_flash.."
  16.     echo "Renaming files.."
  17.     for a in {0..9}; do
  18.         mv dev_flash_00$a* dev_flash_00$a.tar
  19.     done
  20.     for a in {10..24}; do
  21.         mv dev_flash_0$a* dev_flash_0$a.tar
  22.     done
  23.     echo "Extracting SCE TARs.."
  24.     for a in {0..9}; do
  25.         $TOOLS/unpkg dev_flash_00$a.tar dev_flash_00$a
  26.     done
  27.     for a in {10..24}; do
  28.         $TOOLS/unpkg dev_flash_0$a.tar dev_flash_0$a
  29.     done
  30.     for a in {0..9}; do
  31.         mv dev_flash_00$a/content dev_flash_00$a/content.tar
  32.     done
  33.     for a in {10..24}; do
  34.         mv dev_flash_0$a/content dev_flash_0$a/content.tar
  35.     done
  36.     echo "Extracting TARs.."
  37.     for a in {0..9}; do
  38.         cd dev_flash_00$a
  39.         tar -xf ./content.tar
  40.         cd ..
  41.     done
  42.     for a in {10..24}; do
  43.         cd dev_flash_0$a
  44.         tar -xf ./content.tar
  45.         cd ..
  46.     done
  47.     echo "Merging files.."
  48.     mkdir dev_flash
  49.     for a in {0..9}; do
  50.         cp -rf -n dev_flash_00$a/dev_flash ./
  51.     done
  52.     for a in {10..24}; do
  53.         cp -rf -n dev_flash_0$a/dev_flash ./
  54.     done
  55.  
  56.     echo "Deleting dev_flash working dirs.."
  57.     for a in {0..9}; do
  58.         rm -rf dev_flash_00$a
  59.     done
  60.     for a in {10..24}; do
  61.         rm -rf dev_flash_0$a
  62.     done
  63.     echo "Done.."
  64.     echo "dev_flash extracted.."
  65.     echo ""
  66.     echo "Working now on dev_flash3.."
  67.     echo "Renaming file.."
  68.     mv dev_flash3_* dev_flash3.tar
  69.     echo "Extracting SCE TARs.."
  70.     $TOOLS/unpkg dev_flash3.tar dev_flash3_ex
  71.     echo "Renaming file again.."
  72.     mv dev_flash3_ex/content dev_flash3_ex/content.tar
  73.     echo "Extracting TARs.."
  74.     tar -xf ./dev_flash3_ex/content.tar
  75.     echo "Deleting dev_flash3 working dirs.."
  76.     rm -rf dev_flash3_tmp
  77.     echo "Copying dev_flash and dev_flash3"
  78.     cp -rf dev_flash ../../dev_flash
  79.     cp -rf dev_flash3 ../../dev_flash3
  80.     cd ../..
  81.     rm -rf PUP_EX
  82.     echo "Done..."
  83. else
  84.  
  85.     echo "usage: "
  86.     echo "  ./unpack_dev_flash.sh <*.pup>"
  87. fi
  88.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement