Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # cxoffice_clear_iefiles.sh
- #
- # Script to remove temporary internet files in a Crossover Office bottle
- #
- # Usage: ./cxoffice_clear_iefiles.sh bottle_name
- # path to temp files
- IE_FILES="$HOME/.cxoffice/$1/drive_c/users/crossover/Local Settings/Temporary Internet Files/Content.IE5/"
- # show usage information
- [[ -n "$1" ]] || { echo "Usage: 'cxoffice_clear_iefiles.sh bottle_name"; exit 0 ; }
- # check if bottle exists
- for i in "$IE_FILES"
- do
- if test -e "$i"
- then
- echo "$i ------------> pass"
- else
- echo "$i ------------> FAIL"
- quit=1
- fi
- done
- if [ $quit -eq 1 ]
- then
- echo "Sorry, $1 is not a valid option."
- exit
- fi
- quit=0
- # delete temp files directory
- rm -rf "$IE_FILES"
- echo "Temporary files in $1 bottle deleted"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement