summaryrefslogtreecommitdiffstats
path: root/vde/build/get_URL.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2005-07-05 07:31:40 +0000
committer Eric Hameleers <alien@slackware.com>2005-07-05 07:31:40 +0000
commit4207ffa60579978a3552707188e603cfa0f27310 (patch)
tree8640996b9d682f0adb5a4125f094dcd0be0a3aea /vde/build/get_URL.sh
parentb74237d08a1152aed490b0b9245ae6c84da3d723 (diff)
downloadasb-4207ffa60579978a3552707188e603cfa0f27310.tar.gz
asb-4207ffa60579978a3552707188e603cfa0f27310.tar.xz
Initial revision
Diffstat (limited to 'vde/build/get_URL.sh')
-rwxr-xr-xvde/build/get_URL.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/vde/build/get_URL.sh b/vde/build/get_URL.sh
new file mode 100755
index 00000000..d5ca952f
--- /dev/null
+++ b/vde/build/get_URL.sh
@@ -0,0 +1,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)`
+