Store module tarballs in a centralized location to avoid abusing ftp.x.org by downloading them every time we do a clean build
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3937 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/download-xorg b/unix/download-xorg
index c42ec6b..bb5dfb5 100755
--- a/unix/download-xorg
+++ b/unix/download-xorg
@@ -72,9 +72,17 @@
def main():
+ dir = os.path.expanduser("~")+"/.tigervnc-build"
+ cwd = os.getcwd()
+ if not os.path.exists(dir):
+ os.mkdir(dir)
+ os.chdir(dir)
+
for pkg in packages.keys():
loc = packages[pkg]
fname = pkg + ".tar.bz2"
- assert 0 == os.spawnvp(os.P_WAIT, "wget", ["-N", "-c", "-O", fname, loc])
+ if not os.path.exists(fname):
+ assert 0 == os.spawnvp(os.P_WAIT, "wget", ["-N", "-c", "-O", fname, loc])
+ os.chdir(cwd)
main()