Code:
#!/bin/sh
# Install Google Earth for Linux on OpenSUSE 10.1
# Created by Crouse from opensuse.us
# Downloads and Installs Google Earth also creates a desktop icon for all users on the system.
checkforroot ()
{
ROOT_UID=0
if [ "$UID" -ne "$ROOT_UID" ]
then
echo ""
echo "**************** ERROR !! **************"
echo "You must be logged in as root to run this script"
echo "Please log in as root and re-run this script."
echo "**************** ERROR !! **************"
exit
fi
}
checkforroot
cd /
wget http://dl.google.com/earth/GE4/GoogleEarthLinux.bin
chmod a+x GoogleEarthLinux.bin
./GoogleEarthLinux.bin
# You can comment the line below out if you don't want to install an icon on everyones kde desktop.
for i in /home/* ;do cp /usr/local/google-earth/googleearth.desktop /$i/Desktop/googleearth.desktop; done
rm -i GoogleEarthLinux.bin
exit