[Debian-in-commits] [SCM] dh-make-font.git branch, vasudev, updated. 7ab1cef34a633c35917c7552ffc4717877e67bef

Vasudev Kamath kamathvasudev at gmail.com
Sun Dec 18 08:23:17 UTC 2011


The following commit has been merged in the vasudev branch:
commit 7ab1cef34a633c35917c7552ffc4717877e67bef
Author: Vasudev Kamath <kamathvasudev at gmail.com>
Date:   Sun Dec 18 13:53:28 2011 +0530

    Some minor fixes

diff --git a/dh-make-font b/dh-make-font
index 4d263d9..a1c02f7 100755
--- a/dh-make-font
+++ b/dh-make-font
@@ -5,6 +5,10 @@ import sys
 import os
 import re
 
+
+required_files = ["control", "copyright", "changelog", "source", "compat",
+                  "rules"]
+
 # This section of code parses the command line arguments.
 arguments = argparse.ArgumentParser(description='dh-make-font',
                                    epilog='Font package helper')
@@ -22,9 +26,6 @@ arguments.add_argument('--maint',
 arguments.add_argument('foldername',
                        help='Extracted folder containing fonts')
 
-if __name__ == "__main__":
-    args = arguments.parse_args()
-    os.chdir(os.path.abspath(args.foldername))
 
 # Function which checks if the necessary files are there in the directory.
 # Returns a 0 If the required files are found.
@@ -43,7 +44,7 @@ def check_files():
 
 # Failure : Non 0 value 
 # Sucess : 0
-def call_dh_make():	
+def call_dh_make(args):	
 	args_string = " --createorig" # Stores the final argument to be passed to dh_make
 	if(args.copyright):
 		args_string += " -c "+args.copyright
@@ -53,10 +54,17 @@ def call_dh_make():
 	# Make a call to the system function.
 	return os.system("dh_make"+args_string)
 
-# Main flow to call the functions.
-if(check_files()!=0):
+
+if __name__ == "__main__":
+    args = arguments.parse_args()
+    os.chdir(os.path.abspath(args.foldername))
+    # Main flow to call the functions.
+    if(check_files()!=0):
 	print("I could not find .ttf, .sfd, .otf. Atleast one should be there. Dying.")
 	exit(256)
-if(call_dh_make()):
+
+    if(call_dh_make(args)):
 	print("dh_make_font: dh_make died so I dye.")
 	exit(256)
+
+    

-- 
dh-make-font.git



More information about the Debian-in-commits mailing list