#!/bin/bash
  
  clear
  echo -e
  echo -en "\E[32;1m Mounting RAW image... \E[32;0m"
  echo -e
  echo -e
  echo -en "\033[1m Choose ext4 image for edit \033[0m"
  echo -e
  echo -e
  find PROJECT/ -maxdepth 1 -regex '.*\(.img\|.ext4\)' -type f -exec ls {} \;
  echo -e
  
  echo -en "\033[1m Input image <name>: \033[0m"
  tput sgr0
  read INPUT
  
  mkdir PROJECT/$INPUT.mnt
  if [ `uname | grep Linux` ]
  then
  sudo mount -t ext4 -o loop PROJECT/$INPUT.img PROJECT/$INPUT.mnt
  
  elif [ `uname | grep CYGWIN` ]
  then 
    tools/ImgExtractor_V1_1/ImgExtractor.exe PROJECT/$INPUT.img PROJECT/$INPUT.mnt -i
  fi
  
  echo
  echo -en "\033[1m Finished \033[0m"
  echo -e
  tput sgr0
  echo
  echo "Press Enter to continue"
  read enterKey
