summaryrefslogtreecommitdiffstats
path: root/xorg/X11R7.6/buildx.sh
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-12-30 09:41:44 -0800
committerPavel Roskin <plroskin@gmail.com>2017-01-17 18:10:13 -0800
commit265ce370775094f4e816210046c05ea9420744b1 (patch)
treedc1216ad0775069284ba35f28b580fb51d8af116 /xorg/X11R7.6/buildx.sh
parent0afbd57638cbba35d6c081e91262b7c267d04c17 (diff)
downloadxrdp-proprietary-265ce370775094f4e816210046c05ea9420744b1.tar.gz
xrdp-proprietary-265ce370775094f4e816210046c05ea9420744b1.zip
Fix download caching, only download missing or currently empty files
Diffstat (limited to 'xorg/X11R7.6/buildx.sh')
-rwxr-xr-xxorg/X11R7.6/buildx.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/xorg/X11R7.6/buildx.sh b/xorg/X11R7.6/buildx.sh
index 0c61b5e1..56a3b29f 100755
--- a/xorg/X11R7.6/buildx.sh
+++ b/xorg/X11R7.6/buildx.sh
@@ -25,15 +25,23 @@
download_all_files()
{
- # download files parallelly using keepalive
- # a little bit faster than calling wget with single file more than 100 times
- < x11_file_list.txt cut -f1 -d: | sed -e "s|^|${download_url}/|" | \
+ # download files in parallel using keepalive - a little bit faster
+ # than calling wget for a single file more than 100 times
+ urls=
+ for f in `cut -f1 -d: x11_file_list.txt`; do
+ if ! test -s "downloads/$f"; then
+ urls="$urls ${download_url}/$f"
+ fi
+ done
+ if test -n "$urls"; then
+ echo $urls | \
xargs -P2 -n $(expr $num_modules / 2 + 1) \
wget \
--directory-prefix=downloads \
--no-verbose \
--timestamping \
--continue
+ fi
status=$?
return $status