3
# Remove remaining dirs when upgrading (LP: #81698)
5
for i in kvw lang res resources xml; do
6
if [ -d /usr/lib/googleearth/${i} ]; then
7
if ! [ -h /usr/lib/googleearth/${i} ]; then
8
rm -rf /usr/lib/googleearth/${i};
14
. /usr/share/debconf/confmodule
18
license=googleearth-eula
24
echo >&2 "try 'dpkg-reconfigure debconf' to select a frontend other than noninteractive"
28
db_get shared/accepted-$license
29
if [ "$RET" = "true" ]; then
30
echo "$license has already been accepted" >&2
34
# facilitate backup capability per debconf-devel(7)
38
0) # ensure going back from license presentment is harmless
43
db_fset shared/present-$license seen false
44
if ! db_input critical shared/present-$license ; then
45
errmsg "$license could not be presented"
48
db_fset shared/accepted-$license seen false
49
if ! db_input critical shared/accepted-$license ; then
50
errmsg "$license agree question could not be asked"
54
2) # determine users' choice
55
db_get shared/accepted-$license
56
if [ "$RET" = "true" ]; then
60
# error on decline license (give user chance to back up)
61
db_input critical shared/error-$license
63
3) # user has confirmed declining license
64
echo "user did not accept the $license" >&2
68
echo "$license state unknown: $STATE" >&2
81
# proper exit (0 or 1) above
82
errmsg "$license could not be presented / was not accepted"