# QEMU Linux Portable (QLP) Uninstallation Script
# Author: felonwan@gmail.com
# Modified: 2014-10-31

PRJN=qemu-lp #Project Name
INS_DIR=/data/${PRJN}
if [ -e "$INS_DIR" ]; then
  echo "Remove ${PRJN}? (Y--remove; other--not remove)"
  read ans
  if [ "$ans" == "Y" ]; then
    rm -r $INS
    if [ $? -eq 0 ]; then
      echo "Uninstalling ${PRJN} Completed。"
    else
      echo "Uninstallation Failed! Please checking whether $INS is in use, close the applications, then remove $INS directory"
    fi
else
    echo "Can not find $INS_DIR!"
    echo "Please manually check its existence, if exist, remove directly."
fi