root/pbibuild/modules/celestia/overlay-dir/PBI.RemoveScript.sh

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#########################################
9rm -fR /usr/local/bin/celestia
10#rm -fR /usr/local/share/applications/celestia.desktop
11rm -fR /usr/local/share/celestia
12rm -fR /usr/local/share/doc/celestia
13# Remove the old locale files since we are uninstalling
14LANGFILE="celestia.mo"
15cd /Programs/${PROGDIR}/locale
16for i in `ls`
17do
18  rm /usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE}
19done
20if [ ! -z "$DISPLAY" ]
21then
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
35fi
Note: See TracBrowser for help on using the browser.