mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
wget rate-limiting, patch from Nathan Buchanan <nbinont gmail com>
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16523 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
# DISABLE_OPTIMIZATIONS=yes
|
||||
# AQBANKING_WITH_QT=no
|
||||
# GLOBAL_DIR=Z:\\mydir # all directories will use this
|
||||
# WGET_RATE=50k #limit download bandwith to 50KB/s
|
||||
# late_eval 'INSTALL_DIR=$GNUCASH_DIR\\myinst' # no need to define GNUCASH_DIR
|
||||
# block_step inst_docs
|
||||
# late_eval 'add_step greetings'
|
||||
|
||||
@@ -56,8 +56,13 @@ function smart_wget() {
|
||||
# download the file to the tmpdir and then when that completes
|
||||
# move it to the dest dir.
|
||||
if [ ! -f $_DLD/$_FILE ] ; then
|
||||
wget --passive-ftp -c $1 -P $TMP_UDIR
|
||||
mv $TMP_UDIR/$_FILE $_DLD
|
||||
# If WGET_RATE is set (in bytes/sec), limit download bandwith
|
||||
if [ ! -z "$WGET_RATE" ] ; then
|
||||
wget --passive-ftp -c $1 -P $TMP_UDIR --limit-rate=$WGET_RATE
|
||||
else
|
||||
wget --passive-ftp -c $1 -P $TMP_UDIR
|
||||
fi
|
||||
mv $TMP_UDIR/$_FILE $_DLD
|
||||
fi
|
||||
LAST_FILE=$_DLD/$_FILE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user