wok diff get-bitcoin/stuff/get-bitcoin @ rev 20469
fusioninventory-agent: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Oct 12 11:23:47 2018 +0200 (2018-10-12) |
parents | 3f48e3a93cd7 |
children | c07aaa614a02 |
line diff
1.1 --- a/get-bitcoin/stuff/get-bitcoin Mon Dec 31 11:41:25 2012 +0100 1.2 +++ b/get-bitcoin/stuff/get-bitcoin Fri Oct 12 11:23:47 2018 +0200 1.3 @@ -1,15 +1,11 @@ 1.4 #!/bin/sh -e 1.5 1.6 -PACKAGE="bitcoin" 1.7 -VERSION="0.7.2" 1.8 +PACKAGE="$(basename $0 | sed 's/get-//')" 1.9 CATEGORY="misc" 1.10 -WEB_SITE="http://bitcoin.org/" 1.11 +WEB_SITE="http://$PACKAGE.org/" 1.12 SHORT_DESC="New digital currency for instant payments to anyone, anywhere." 1.13 -MAINTAINER="somebody@bitcoin.org" 1.14 +MAINTAINER="somebody@$PACKAGE.org" 1.15 DEPENDS="libQtGui bzlib" 1.16 -TARBALL="$PACKAGE-$VERSION-linux.tar.gz" 1.17 -SF_MIRROR="http://netcologne.dl.sourceforge.net/project" 1.18 -URL="$SF_MIRROR/$PACKAGE/Bitcoin/$PACKAGE-$VERSION/$TARBALL" 1.19 1.20 ROOT="$1" 1.21 [ -d "$ROOT" ] || ROOT="" 1.22 @@ -31,7 +27,10 @@ 1.23 mkdir -p $TMP_DIR && cd $TMP_DIR 1.24 1.25 # Download tarball 1.26 +URL=$(wget -O - $WEB_SITE/en/download | sed \ 1.27 + '/linux.tar/!d;s/.*href="\([^"]*\).*/\1/;s|/download$||') 1.28 FILE="$(basename $URL)" 1.29 +VERSION="$(echo $FILE | sed 's/.*coin-\(.*\)-linux.tar.*/\1/')" 1.30 wget -O $FILE "$URL" 1.31 1.32 if [ ! -f $FILE ]; then 1.33 @@ -59,7 +58,7 @@ 1.34 Version=1.0 1.35 Encoding=UTF-8 1.36 Name=$PACKAGE 1.37 -Exec=/usr/bin/bitcoin-qt 1.38 +Exec=/usr/bin/$PACKAGE-qt 1.39 Icon=stock_certificate.png 1.40 Terminal=false 1.41 Categories=Application