diff --git a/network/googleearth/googleearth.conf b/network/googleearth/googleearth.conf index 76e71260b..b178cc001 100644 --- a/network/googleearth/googleearth.conf +++ b/network/googleearth/googleearth.conf @@ -21,14 +21,20 @@ fi # comes as script with a bzip2 at the end so we need to find out # how many bytes the archive is and then extract it using tail -install_googleearth(){ +custextract=googleearth_extract +googleearth_extract() { + local filesizes= # Determine the size of the archive. - googleebin="archdir/GoogleEarthLinux-*.bin" - binsize=$(strings $googleebin |grep "filesizes="|head -n 1|sed 's,[^0-9],,g') + eval $( strings "$1" | grep '^filesizes=' ) # Extract the archive. + echo "Extracting $xsrctar:$filesizes ($taropt) ... " + mkdir googleearth - tail --bytes $binsize $googleebin | tar -xjf - -C googleearth + tail --bytes $filesizes $1 | tar -v $taropt - -C googleearth > untar.txt +} + +install_googleearth(){ # Do the actual installation. mkdir -pv $root/$prefix/google-earth @@ -44,5 +50,3 @@ install_googleearth(){ echo "export GOOGLEEARTH_DATA_PATH=$root/$prefix/google-earth" > \ $sysconfdir/profile.d/googleearth } -autoextract=0 -custmain="install_googleearth"