#!/bin/bash
  
  clear
  
  echo -e
  echo -en "\E[32;1m Extracting ROM... \E[32;0m"
  echo -e
  echo -e
  tput sgr0
  
  find . -maxdepth 1 -name "*.zip" -type f  -exec unzip -d STOCK/ {} \;
  
  find . -maxdepth 1 -name "*.rar" -type f  -exec unrar e {} STOCK/ \;
  
  find . -maxdepth 1 -regex '.*\(.tar\|.md5\)' -type f  -exec tar -vxf {} -C STOCK/ \;
  
  find STOCK/ -maxdepth 1 -regex '.*\(.tar\|.md5\)' -type f  -exec tar -vxf {} -C STOCK/ \;
  
  echo
  echo -e -n "\033[1m Finished \033[0m"
  tput sgr0
  echo
  echo "Press Enter to continue"
  read enterKey
