1. Update the Chinese conversion tables.
[lhc/web/wiklou.git] / includes / zhtable / Makefile.py
index fbe900e..ea78fbd 100644 (file)
@@ -5,6 +5,8 @@ import tarfile, zipfile
 import os, re, shutil, sys, platform
 
 pyversion = platform.python_version()
+islinux = platform.system().lower() == 'linux' or False
+
 if pyversion[:3] in ['2.5', '2.6', '2.7']:
     import urllib as urllib_request
     import codecs
@@ -30,9 +32,15 @@ def GetFileFromURL( url, dest ):
     if os.path.isfile(dest):
         print( 'File %s up to date.' % dest )
         return
-    print( 'Downloading from [%s] ...' % url )
-    urllib_request.urlretrieve( url, dest )
-    print( 'Download complete.\n' )
+    global islinux
+    if islinux:
+        # we use wget instead urlretrieve under Linux, 
+        # because wget will display details like download progress
+        os.system('wget %s' % url)
+    else:
+        print( 'Downloading from [%s] ...' % url )
+        urllib_request.urlretrieve( url, dest )
+        print( 'Download complete.\n' )
     return
 
 def GetFileFromUnihan( path ):