From: DRC Date: Fri, 8 Jan 2010 09:53:21 +0000 (+0000) Subject: Store module tarballs in a centralized location to avoid abusing ftp.x.org by downloa... X-Git-Tag: v1.0.90~359 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a4385e0a3d6b6843debb9057aafbb74616883a26;p=tigervnc.git 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/build-xorg-7.4 b/unix/build-xorg-7.4 index e1fc83f2..3460f8e5 100755 --- a/unix/build-xorg-7.4 +++ b/unix/build-xorg-7.4 @@ -65,7 +65,7 @@ init() update_modules pushd xorg - tar jxf util-macros.tar.bz2 + tar jxf ~/.tigervnc-build/util-macros.tar.bz2 pushd util-macros-* echo "Building macros" ./configure ${1+"$@"} --prefix=${PREFIX} @@ -89,10 +89,10 @@ update_modules() pushd xorg ../download-xorg for module in ${modules}; do - tar jxf ${module}.tar.bz2 + tar jxf ~/.tigervnc-build/${module}.tar.bz2 done - tar jxf Mesa.tar.bz2 - tar jxf xorg-server.tar.bz2 + tar jxf ~/.tigervnc-build/Mesa.tar.bz2 + tar jxf ~/.tigervnc-build/xorg-server.tar.bz2 cp -r xorg-server-1.*/* ../xserver popd } diff --git a/unix/download-xorg b/unix/download-xorg index c42ec6bf..bb5dfb58 100755 --- a/unix/download-xorg +++ b/unix/download-xorg @@ -72,9 +72,17 @@ packages = { 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()