#!/bin/sh

pause_exit ()
{
   echo Press Enter to continue
   read foo
   exit
}

echo HP Smart Update Manager Repository cache delete script
echo                       -
echo Removing HP SUM repository cache files will make HP SUM take longer
echo to run the next time it is used.
echo                       -
echo This script should not be run while HP SUM is running.
echo                       -
echo -n Are you sure you want to delete HP SUM repository cache files? [y or n] : 
read ok

if [ "x$ok" != "xy" ]; then
  echo Exiting without deleting any files.
  pause_exit
fi

if [ -d /tmp/hp_sum/RepositoryManager ]; then
  echo Removing /tmp/hp_sum/RepositoryManager
  rm -rf /tmp/hp_sum/RepositoryManager
else
  echo No cache files found to delete at /tmp/hp_sum/RepositoryManager
fi
pause_exit

