From 51c534c2bd638d6ef849bac15c6106a17a682b56 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Sat, 1 Nov 2008 18:09:20 +0100 Subject: [PATCH] Bug #347: wget options are configurable now. --- pkgmk.conf | 1 + pkgmk.conf.5.in | 6 +++++- pkgmk.in | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgmk.conf b/pkgmk.conf index 5d76a6a..07b1cbd 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 36a26c1..dcb6a20 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 1cc40d6..00d8e95 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" -- 2.26.2