wok-current rev 593
get-google-earth: use tmp dir
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 17 09:50:35 2008 +0000 (2008-04-17) |
parents | 1557df49c519 |
children | a93134a161ac |
files | get-google-earth/stuff/get-google-earth |
line diff
1.1 --- a/get-google-earth/stuff/get-google-earth Thu Apr 17 09:36:57 2008 +0000 1.2 +++ b/get-google-earth/stuff/get-google-earth Thu Apr 17 09:50:35 2008 +0000 1.3 @@ -11,6 +11,10 @@ 1.4 [ -d /var/lib/tazpkg/installed/google-earth ] && exit 1 1.5 fi 1.6 1.7 +TMP_DIR=/tmp/get-google-earth-$$-$RANDOM 1.8 +CUR_DIR=$(pwd) 1.9 +cd $TMP_DIR 1.10 + 1.11 # Download tarball 1.12 wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin 1.13 chmod +x GoogleEarthLinux.bin 1.14 @@ -27,9 +31,9 @@ 1.15 find /usr/local/google-earth > files.list 1.16 cat >> files.list <<EOT 1.17 /usr/share/applications/Google-googleearth.desktop 1.18 +/usr/share/applications/defaults.list 1.19 /sbin/googleearth 1.20 EOT 1.21 -#/usr/share/applications/defaults.list 1.22 cat > receipt <<EOT 1.23 PACKAGE="google-earth" 1.24 VERSION="$VERSION" 1.25 @@ -48,5 +52,6 @@ 1.26 tazpkg install google-earth-$VERSION.tazpkg 1.27 1.28 # Clean 1.29 -rm -f GoogleEarthLinux.bin 1.30 +cd $CUR_DIR 1.31 +rm -rf $TMP_DIR 1.32