Anyone familiar with uninstall scripts?
I installed Google Earth from the Google site. That version is no good (others here have reported and I can confirm), so I want to uninstall it before trying the version from the medibuntu repository. Not possible to uninstall from Software Center or Synaptic and the uninstall script in its home dir is not working. It seems to be testing for various operating systems and branching to the appropriate uninstall program for the returned value, but I am not sure it is testing for linux at all (tests for "OpenUNIX", but that does not seem successful).
Script is /opt/google-earth/uninstall
with
or
Code:
sudo bash uninstall
it goes right to the final section (with none of the conditional test echo texts appearing) with it's own "I didn't find diddly here dude" message:
--Could not find a usable uninstall program. Aborting.--
So do I have other uninstall options or any suggestions on editing the script to correct it? script below.
Code:
#! /bin/sh
#### UNINSTALL SCRIPT - Generated by SetupDB 1.6 #####
DetectARCH()
{
status=1
case `uname -m` in
amd64 | x86_64) echo "amd64"
status=0;;
i?86 | i86*) echo "x86"
status=0;;
90*/*)
echo "hppa"
status=0;;
*)
case `uname -s` in
IRIX*)
echo "mips"
status=0;;
AIX*)
echo "ppc"
status=0;;
*)
arch=`uname -p 2>/dev/null || uname -m`
if test "$arch" = powerpc; then
echo "ppc"
else
echo $arch
fi
status=0;;
esac
esac
return $status
}
DetectOS()
{
os=`uname -s`
if test "$os" = OpenUNIX; then
echo SCO_SV
else
echo $os
fi
return 0
}
FindBinary()
{
arch=$1
if which loki-uninstall 2> /dev/null > /dev/null || type -p loki-uninstall 2> /dev/null > /dev/null; then
if loki-uninstall -v > /dev/null 2> /dev/null; then
echo `exec 2>&-; which loki-uninstall || type loki-uninstall`
else
echo "$HOME/.loki/installed/bin/`DetectOS`/$arch/uninstall"
fi
else
echo "$HOME/.loki/installed/bin/`DetectOS`/$arch/uninstall"
fi
}
arch=`DetectARCH`
UNINSTALL=`FindBinary $arch`
# Special case: if amd64 and binary is missing, try to run x86 build...
if test ! -x "$UNINSTALL" ; then
if test "$arch" = amd64 ; then
UNINSTALL=`FindBinary x86`
fi
fi
if test ! -x "$UNINSTALL" ; then
echo Could not find a usable uninstall program. Aborting.
exit 1
fi
exec "$UNINSTALL" -L google-earth "/opt/google-earth/.manifest/google-earth.xml" "$1"
Bookmarks