2013-12-27

Slitaz -- get-wink

get-wink

tar: option requires an argument -- 'f'

   wget -O - http://www.debugmode.com/wink/download.php 2> /dev/null | \
       grep gz | sed 's/.*<a href=\(.*\)gz>.*/\1gz/'


1.
root@slitaz:/tmp# get-wink
tar: option requires an argument -- 'f'

Command line: tar -xzf

BusyBox v1.21.0 (2013-04-26 02:03:45 CEST) multi-call binary.

Usage: tar -[cxtZzJjahmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...


2.
[..]
dl_urls()
{
   wget -O - http://www.debugmode.com/wink/download.php 2> /dev/null | \
       grep gz | sed 's/.*<a href=\(.*\)gz>.*/\1gz/'
}

WEB_SITE="http://www.debugmode.com/wink/"

TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM
CUR_DIR=$(pwd)
mkdir -p $TMP_DIR && cd $TMP_DIR

# Download tarball
for i in $(dl_urls); do
    TARBALL=$(basename $i)
    wget $i && break
done
if [ ! -f $TARBALL ]; then
    cd $CUR_DIR
    rm -rf $TMP_DIR
    echo "Could not download $TARBALL. Exiting."
    exit 1
fi

VERSION=${TARBALL%.*}
VERSION=${VERSION%.tar}
VERSION=${VERSION#wink}

# Extract
tar xzf $TARBALL
....