From: Liangent Date: Sat, 12 May 2012 13:31:07 +0000 (+0800) Subject: Tweak includes/zhtable/Makefile.py X-Git-Tag: 1.31.0-rc.0~23588 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=7443931d5c9743c8b6d14b2606e8597f756f1f3e;p=lhc%2Fweb%2Fwiklou.git Tweak includes/zhtable/Makefile.py * Make it executable and use a more generic shebang line. * Write ZhConversion.php to its own location directly, so it can be more convenient to do git checkout -b; edits; ./Makefile.py; git diff; to confirm changes made. * Cosmetic text changes. Change-Id: Ia3556e3b2cd5ee4eeaa67c4e535141576f13dc16 --- diff --git a/includes/zhtable/Makefile.py b/includes/zhtable/Makefile.py old mode 100644 new mode 100755 index 305422bd61..2bb53ab6ee --- a/includes/zhtable/Makefile.py +++ b/includes/zhtable/Makefile.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- # @author Philip import tarfile as tf @@ -39,7 +39,7 @@ LIBTABE_VER = '0.2.3' def download( url, dest ): if os.path.isfile( dest ): - print( 'File %s up to date.' % dest ) + print( 'File %s is up to date.' % dest ) return global islinux if islinux: @@ -372,13 +372,13 @@ $zh2Hant = array(\n''' + PHPArray( toSG ) \ + '\n);' - f = open( 'ZhConversion.php', 'wb', encoding = 'utf8' ) + f = open( os.path.join( '..', 'ZhConversion.php' ), 'wb', encoding = 'utf8' ) print ('Writing ZhConversion.php ... ') f.write( php ) f.close() - #Remove temp files - print ('Deleting temp files ... ') + # Remove temporary files + print ('Deleting temporary files ... ') os.remove('EZ-Big.txt.in') os.remove('phrase_lib.txt') os.remove('tsi.src')