summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2008-11-01 18:09:20 +0100
committerTilman Sauerbeck <tilman@crux.nu>2008-11-01 18:09:20 +0100
commit51c534c2bd638d6ef849bac15c6106a17a682b56 (patch)
treeb34dcd3eefdd5f73e0eebaadfd48d7919eaa422d
parent92dbaab6a7ea34dc55308d12578453ec7e498295 (diff)
downloadpkgutils-51c534c2bd638d6ef849bac15c6106a17a682b56.tar.gz
pkgutils-51c534c2bd638d6ef849bac15c6106a17a682b56.tar.xz
Bug #347: wget options are configurable now.
-rw-r--r--pkgmk.conf1
-rw-r--r--pkgmk.conf.5.in6
-rwxr-xr-xpkgmk.in4
3 files changed, 8 insertions, 3 deletions
diff --git a/pkgmk.conf b/pkgmk.conf
index 5d76a6a3..07b1cbd5 100644
--- a/pkgmk.conf
+++ b/pkgmk.conf
@@ -12,5 +12,6 @@ export CXXFLAGS="-O2 -march=i686 -pipe"
# PKGMK_DOWNLOAD="no"
# PKGMK_IGNORE_FOOTPRINT="no"
# PKGMK_NO_STRIP="no"
+# PKGMK_WGET_OPTS=""
# End of file
diff --git a/pkgmk.conf.5.in b/pkgmk.conf.5.in
index 36a26c1b..dcb6a207 100644
--- a/pkgmk.conf.5.in
+++ b/pkgmk.conf.5.in
@@ -39,6 +39,10 @@ Set directory for building packages.
.br
Default: '\fBfoo\fP/work', where \fBfoo\fP is the directory of the Pkgfile.
.TP
+\fBPKGMK_WGET_OPTS='STRING'\fP
+Additional options for wget(1), which is used by pkgmk to download all files.
+.br
+.TP
\fBPKGMK_DOWNLOAD='STRING'\fP
If set to 'yes', pkgmk will download the source archives if necessary.
.br
@@ -56,6 +60,6 @@ Default: 'no'
.SH SEE ALSO
pkgmk(8)
.SH COPYRIGHT
-pkgmk (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2007 CRUX team (http://crux.nu).
+pkgmk (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2008 CRUX team (http://crux.nu).
pkgmk (pkgutils) is licensed through the GNU General Public License.
Read the COPYING file for the complete license.
diff --git a/pkgmk.in b/pkgmk.in
index 1cc40d60..00d8e954 100755
--- a/pkgmk.in
+++ b/pkgmk.in
@@ -101,7 +101,7 @@ download_file() {
BASENAME=`get_basename $1`
for REPO in ${PKGMK_SOURCE_MIRRORS[@]}; do
REPO="`echo $REPO | sed 's|/$||'`"
- wget $RESUME_CMD $DOWNLOAD_OPTS $REPO/$BASENAME
+ wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $REPO/$BASENAME
error=$?
if [ $error == 0 ]; then
break
@@ -110,7 +110,7 @@ download_file() {
if [ $error != 0 ]; then
while true; do
- wget $RESUME_CMD $DOWNLOAD_OPTS $1
+ wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $1
error=$?
if [ $error != 0 ] && [ "$RESUME_CMD" ]; then
info "Partial download failed, restarting"

Generated by cgit