|
Revision 1394, 1.0 KB
(checked in by gonzalo, 10 months ago)
|
|
Celestia added
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # Filename: PBI.RemoveScript.sh |
|---|
| 3 | # Place any custom removal code here. |
|---|
| 4 | # This script will be run before your program is deleted. |
|---|
| 5 | # ${1} is the directory name. |
|---|
| 6 | # ${2} is the username of person performing the deletion. |
|---|
| 7 | # TIP: 'kdialog' should be used for user interaction. |
|---|
| 8 | ######################################### |
|---|
| 9 | rm -fR /usr/local/bin/celestia |
|---|
| 10 | #rm -fR /usr/local/share/applications/celestia.desktop |
|---|
| 11 | rm -fR /usr/local/share/celestia |
|---|
| 12 | rm -fR /usr/local/share/doc/celestia |
|---|
| 13 | # Remove the old locale files since we are uninstalling |
|---|
| 14 | LANGFILE="celestia.mo" |
|---|
| 15 | cd /Programs/${PROGDIR}/locale |
|---|
| 16 | for i in `ls` |
|---|
| 17 | do |
|---|
| 18 | rm /usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE} |
|---|
| 19 | done |
|---|
| 20 | if [ ! -z "$DISPLAY" ] |
|---|
| 21 | then |
|---|
| 22 | # Ask if we want to remove the user profiles |
|---|
| 23 | kdialog --yesno "Do you want to remove Celestia user settings?" --title "Remove user settings" |
|---|
| 24 | if [ "$?" = "0" ] |
|---|
| 25 | then |
|---|
| 26 | cd /home |
|---|
| 27 | for i in `ls` |
|---|
| 28 | do |
|---|
| 29 | if [ -e "/home/${i}/.celestia" ] |
|---|
| 30 | then |
|---|
| 31 | rm -rf /home/${i}/.celestia |
|---|
| 32 | fi |
|---|
| 33 | done |
|---|
| 34 | fi |
|---|
| 35 | fi |
|---|