blob: d5ca952ff75819a7af9be49765a860ebc8cdb43e (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
# $Id$
# ---------------------------------------------------------------------------
# Download a software tarball.
# The script tries to determine the version to be downloaded in two ways:
# 1: is it supplied as a parameter?
# 2: is it found in the corresponding SlackBuild script?
#
# If the tarball is already present, do not download again.
#
PRGNAM=vde
VERSION=$1
URL='http://belnet.dl.sourceforge.net/sourceforge/vde/${PRGNAM}-${VERSION}.tgz'
if [ "$VERSION" == "" ]; then
[ -s ${PRGNAM}.SlackBuild ] && eval `grep "^VERSION=" ${PRGNAM}.SlackBuild`
if [ "$VERSION" == "" ]; then
echo "Must supply version number as parameter !"
exit 1
fi
fi
if [ -s `basename \`echo $(eval echo \$URL)\`` ]; then
echo "File `basename \`echo $(eval echo \$URL)\`` already present!"
exit 1
else
echo "File `basename \`echo $(eval echo \$URL)\`` not yet present locally!"
fi
echo "Getting ${PRGNAM} (version ${VERSION}) at `echo $(eval echo $URL)`"
#curl `echo $(eval echo $URL)` -o `basename \`echo $(eval echo \$URL)\``
wget -nv `echo $(eval echo $URL)`
|