#!/bin/bash
  
  clear
  echo -e
  echo -en "\E[32;1m Rebuilding boot image... \E[32;0m"
  echo -e
  echo -e
  echo -en "\033[1m Choose ext4 image for edit \033[0m"
  echo -e
  echo -e
  ls \
  STOCK/boot.img \
  STOCK/recovery.img
  echo -e
  
  echo -en "\033[1m Input image <name>: \033[0m"
  tput sgr0
  read INPUT
  echo -e
  
  echo -en "\033[1m  Rename original $INPUT \033[0m"
  echo -e
  echo -e
  
  tools/mkbootimg_tools/com_mkboot PROJECT/$INPUT.tmp PROJECT/$INPUT

  rm -rf PROJECT/$INPUT.tmp
  
  echo
  echo -en "\033[1m Finished \033[0m"
  echo
  tput sgr0
  echo
  echo "Press Enter to continue"
  read enterKey
