[DEV] minor correction

This commit is contained in:
Edouard DUPIN 2015-06-21 21:59:25 +02:00
parent 07058eda14
commit 2bb4e2d377

View File

@ -41,7 +41,8 @@ def get_print_pretty_mode():
def end_with(name, list): def end_with(name, list):
for appl in list: for appl in list:
if name[len(name)-len(appl):] == appl: #debug.info("pppppppp : " + str([name[-len(appl):], appl]))
if name[-len(appl):] == appl:
return True return True
return False return False
@ -60,19 +61,7 @@ def print_pretty(myString, force=False):
tmpcmdLine = tmpcmdLine.replace('\n\t\n\t', '\n\t') tmpcmdLine = tmpcmdLine.replace('\n\t\n\t', '\n\t')
tmpcmdLine = tmpcmdLine.replace('\n\t\n\t', '\n\t') tmpcmdLine = tmpcmdLine.replace('\n\t\n\t', '\n\t')
baseElementList = [] baseElementList = []
if end_with(cmdApplication, ["g++", "gcc", "clang", "clang++", "ar", "ld", "ranlib"]) == True: if end_with(cmdApplication, ["javac"]) == True:
baseElementList = [
"-o",
"-D",
"-I",
"-L",
"-framework",
"-isysroot",
"-arch",
"-keystore",
"-sigalg",
"-digestalg"]
elif end_with(cmdApplication, ["javac"]) == True:
baseElementList = [ baseElementList = [
"-d", "-d",
"-D", "-D",
@ -92,6 +81,18 @@ def print_pretty(myString, force=False):
"-S", "-S",
"-J" "-J"
] ]
elif end_with(cmdApplication, ["g++", "gcc", "clang", "clang++", "ar", "ld", "ranlib"]) == True:
baseElementList = [
"-o",
"-D",
"-I",
"-L",
"-framework",
"-isysroot",
"-arch",
"-keystore",
"-sigalg",
"-digestalg"]
for element in baseElementList: for element in baseElementList:
tmpcmdLine = tmpcmdLine.replace(element+'\n\t', element+' ') tmpcmdLine = tmpcmdLine.replace(element+'\n\t', element+' ')
for element in ["<", "<<", ">", ">>"]: for element in ["<", "<<", ">", ">>"]: