Advertisement
Guest User

remove temporary internet files in a Crossover Office bottle

a guest
May 1st, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.77 KB | None | 0 0
  1. #!/bin/bash
  2. #  cxoffice_clear_iefiles.sh
  3. #  
  4. #  Script to remove temporary internet files in a Crossover Office bottle
  5. #  
  6. #  Usage: ./cxoffice_clear_iefiles.sh bottle_name
  7.  
  8. # path to temp files
  9. IE_FILES="$HOME/.cxoffice/$1/drive_c/users/crossover/Local Settings/Temporary Internet Files/Content.IE5/"
  10.  
  11. # show usage information
  12. [[ -n "$1" ]] || { echo "Usage: 'cxoffice_clear_iefiles.sh bottle_name"; exit 0 ; }
  13.  
  14. # check if bottle exists
  15. for i in "$IE_FILES"
  16. do
  17.   if  test -e "$i"
  18.   then
  19.     echo "$i ------------> pass"
  20.   else
  21.     echo "$i ------------> FAIL"
  22.     quit=1
  23.   fi
  24. done
  25. if [ $quit -eq 1 ]
  26. then
  27.  echo "Sorry, $1 is not a valid option."
  28.  exit
  29. fi
  30.  
  31. quit=0
  32.  
  33. # delete temp files directory
  34. rm -rf "$IE_FILES"
  35. echo "Temporary files in $1 bottle deleted"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement