aboutsummaryrefslogtreecommitdiff
path: root/0.8.0/ebuild/fetchers
diff options
context:
space:
mode:
Diffstat (limited to '0.8.0/ebuild/fetchers')
-rw-r--r--0.8.0/ebuild/fetchers/Makefile.am27
-rwxr-xr-x0.8.0/ebuild/fetchers/dofile6
-rwxr-xr-x0.8.0/ebuild/fetchers/dowget.in10
3 files changed, 43 insertions, 0 deletions
diff --git a/0.8.0/ebuild/fetchers/Makefile.am b/0.8.0/ebuild/fetchers/Makefile.am
new file mode 100644
index 0000000..8a4dd4f
--- /dev/null
+++ b/0.8.0/ebuild/fetchers/Makefile.am
@@ -0,0 +1,27 @@
+MAINTAINERCLEANFILES = Makefile.in
+CLEANFILES = *~ dohttp dohttps doftp
+SUBDIRS = .
+
+libexecprogdir = $(libexecdir)/paludis/fetchers/
+
+libexecprog_SCRIPTS = \
+ dohttp \
+ dohttps \
+ doftp \
+ dofile
+
+TESTS_ENVIRONMENT = env \
+ PALUDIS_EBUILD_DIR="$(srcdir)/ebuild/" \
+ TEST_SCRIPT_DIR="$(srcdir)/" \
+ bash $(top_srcdir)/test/run_test.sh
+
+TESTS =
+EXTRA_DIST = $(libexecprog_SCRIPTS) dowget.in
+
+check_SCRIPTS =
+check_PROGRAMS = $(TESTS)
+
+AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
+
+dohttp dohttps doftp : dowget.in
+ cat $< > $@
diff --git a/0.8.0/ebuild/fetchers/dofile b/0.8.0/ebuild/fetchers/dofile
new file mode 100755
index 0000000..fd3e54b
--- /dev/null
+++ b/0.8.0/ebuild/fetchers/dofile
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+shopt -s extglob
+echo cp "/${1##file:+(/)}" "${2}" 1>&2
+cp "/${1##file:+(/)}" "${2}"
+
diff --git a/0.8.0/ebuild/fetchers/dowget.in b/0.8.0/ebuild/fetchers/dowget.in
new file mode 100755
index 0000000..a6d8007
--- /dev/null
+++ b/0.8.0/ebuild/fetchers/dowget.in
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+echo ${WGET_WRAPPER} ${LOCAL_WGET:-wget} ${EXTRA_WGET} -T 30 -t 1 -O "${2}" "${1}" 1>&2
+if ${WGET_WRAPPER} ${LOCAL_WGET:-wget} ${EXTRA_WGET} -T 30 -t 1 -O "${2}" "${1}" ; then
+ exit 0
+else
+ rm -f "${2}"
+ exit 1
+fi
+