wok view get-google-earth/stuff/get-google-earth @ rev 993

syslinux: reduce splash height
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jul 05 14:11:03 2008 +0000 (2008-07-05)
parents 1f859429f92c
children 45650e1226df
line source
1 #!/bin/sh -e
3 if test $(id -u) != 0 ; then
4 echo -e "\nYou must be root to run `basename $0`."
5 echo -e "Please type 'su' and root password to become super-user.\n"
6 exit 0
7 fi
9 if [ -d /var/lib/tazpkg/installed/google-earth ]; then
10 tazpkg remove google-earth
11 [ -d /var/lib/tazpkg/installed/google-earth ] && exit 1
12 fi
14 TMP_DIR=/tmp/get-google-earth-$$-$RANDOM
15 CUR_DIR=$(pwd)
16 mkdir -p $TMP_DIR && cd $TMP_DIR
18 # Download tarball
19 wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin
20 chmod +x GoogleEarthLinux.bin
22 VERSION=$(head GoogleEarthLinux.bin | grep ^label | sed 's/.*Linux \(.*\)"/\1/')
24 # Extract
25 ./GoogleEarthLinux.bin
27 # Create pseudo package
28 mkdir -p fs/usr/bin
29 cp /usr/bin/get-google-earth fs/usr/bin
30 find fs | cpio -o -H newc | gzip -9 > fs.cpio.gz
31 find /usr/local/google-earth > files.list
32 cat >> files.list <<EOT
33 /usr/share/applications/Google-googleearth.desktop
34 /usr/share/applications/defaults.list
35 /sbin/googleearth
36 EOT
37 cat > receipt <<EOT
38 PACKAGE="google-earth"
39 VERSION="$VERSION"
40 CATEGORY="non-free"
41 SHORT_DESC="3D planet viewer."
42 WEB_SITE="http://earth.google.com/"
43 DEPENDS="mesa"
44 EOT
45 cpio -o -H newc > google-earth-$VERSION.tazpkg <<EOT
46 receipt
47 files.list
48 fs.cpio.gz
49 EOT
51 # Install pseudo package
52 tazpkg install google-earth-$VERSION.tazpkg
54 # Clean
55 cd $CUR_DIR
56 rm -rf $TMP_DIR