]> source.dussan.org Git - tigervnc.git/commitdiff
Store module tarballs in a centralized location to avoid abusing ftp.x.org by downloa...
authorDRC <dcommander@users.sourceforge.net>
Fri, 8 Jan 2010 09:53:21 +0000 (09:53 +0000)
committerDRC <dcommander@users.sourceforge.net>
Fri, 8 Jan 2010 09:53:21 +0000 (09:53 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3937 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/build-xorg-7.4
unix/download-xorg

index e1fc83f2000427487298d7951fe541e373b6eb8f..3460f8e5d43bc3127baa47524366933726eec4eb 100755 (executable)
@@ -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
 }
index c42ec6bfed76370b8cc813bd09ef5457ce3d38c3..bb5dfb5845c250eb9a60a21e1e43ec1b89f4aec5 100755 (executable)
@@ -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()