r16523 - gnucash/trunk/packaging/win32 - wget rate-limiting, patch from Nathan Buchanan <nbinont gmail com>
Josh Sled
jsled at cvs.gnucash.org
Tue Sep 11 22:46:48 EDT 2007
Author: jsled
Date: 2007-09-11 22:46:47 -0400 (Tue, 11 Sep 2007)
New Revision: 16523
Trac: http://svn.gnucash.org/trac/changeset/16523
Modified:
gnucash/trunk/packaging/win32/defaults.sh
gnucash/trunk/packaging/win32/functions.sh
Log:
wget rate-limiting, patch from Nathan Buchanan <nbinont gmail com>
Modified: gnucash/trunk/packaging/win32/defaults.sh
===================================================================
--- gnucash/trunk/packaging/win32/defaults.sh 2007-09-11 00:38:29 UTC (rev 16522)
+++ gnucash/trunk/packaging/win32/defaults.sh 2007-09-12 02:46:47 UTC (rev 16523)
@@ -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'
Modified: gnucash/trunk/packaging/win32/functions.sh
===================================================================
--- gnucash/trunk/packaging/win32/functions.sh 2007-09-11 00:38:29 UTC (rev 16522)
+++ gnucash/trunk/packaging/win32/functions.sh 2007-09-12 02:46:47 UTC (rev 16523)
@@ -56,8 +56,13 @@
# 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
}
More information about the gnucash-changes
mailing list