From 7443931d5c9743c8b6d14b2606e8597f756f1f3e Mon Sep 17 00:00:00 2001 From: Liangent Date: Sat, 12 May 2012 21:31:07 +0800 Subject: [PATCH] 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 --- includes/zhtable/Makefile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 includes/zhtable/Makefile.py 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') -- 2.20.1