wok-current rev 10911
get-dropbox: no hardcoded version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 28 10:20:30 2011 +0200 (2011-07-28) |
parents | fc077654c9ac |
children | ec8e9b8247ba |
files | get-dropbox/stuff/get-dropbox |
line diff
1.1 --- a/get-dropbox/stuff/get-dropbox Wed Jul 27 18:48:00 2011 +0100 1.2 +++ b/get-dropbox/stuff/get-dropbox Thu Jul 28 10:20:30 2011 +0200 1.3 @@ -3,11 +3,12 @@ 1.4 # Get and install Dropbox for Linux 1.5 1.6 PACKAGE="dropbox" 1.7 -VERSION="0.6.487" 1.8 -TARBALL="$PACKAGE-lnx.x86-$VERSION.tar.gz" 1.9 -URL="http://dl.getdropbox.com/u/17/$TARBALL" 1.10 +WEB_SITE="http://www.dropbox.com" 1.11 +PLATFORM="lnx.x86" # or lnx.x86_64 1.12 +TARBALL=$PACKAGE-$PLATFORM.tar.gz 1.13 +URL="$WEB_SITE/download/?plat=$PLATFORM" 1.14 CUR_DIR=$(pwd) 1.15 -TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$ 1.16 +TEMP_DIR=/tmp/$PACKAGE-$PLATFORM-$$ 1.17 ROOT="$1" 1.18 1.19 # Check if we are root 1.20 @@ -28,7 +29,7 @@ 1.21 cd $TEMP_DIR 1.22 1.23 # Download the file 1.24 -wget $URL 1.25 +wget -O $TARBALL $URL 1.26 1.27 if [ ! -f $TARBALL ]; then 1.28 echo "Could not download $TARBALL. Exiting." 1.29 @@ -40,6 +41,7 @@ 1.30 tar xzf $TARBALL 1.31 # extracted pkg can be removed: Save RAM 1.32 rm -f $TARBALL 1.33 +VERSION="$(cat $TEMP_DIR/.dropbox-dist/VERSION)" 1.34 1.35 mkdir -p $PACKAGE-$VERSION/fs/usr/lib \ 1.36 $PACKAGE-$VERSION/fs/usr/bin \ 1.37 @@ -80,7 +82,7 @@ 1.38 CATEGORY="non-free" 1.39 SHORT_DESC="Dropbox daemon and client for online storage." 1.40 DEPENDS="python" 1.41 -WEB_SITE="http://www.getdropbox.com/" 1.42 +WEB_SITE="$WEB_SITE/" 1.43 SUGGESTED="ntlmaps" 1.44 EOT 1.45 1.46 @@ -93,6 +95,10 @@ 1.47 # Install pseudo package 1.48 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 1.49 1.50 +case " $@ " in 1.51 +*\ --k*) mv $PACKAGE-$VERSION.tazpkg $CUR_DIR ;; 1.52 +esac 1.53 + 1.54 # Clean 1.55 cd $CUR_DIR 1.56 rm -rf $TEMP_DIR