changeset 177:aff3b5fbd669

Removed two not necessary slash in the indenter shell script and added the shebang. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@381 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Tue, 05 Jun 2007 06:50:44 +0000
parents 770ac3c53bea
children eae306792116
files src/indenthandler.cpp
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/indenthandler.cpp	Mon Jun 04 15:38:28 2007 +0000
+++ b/src/indenthandler.cpp	Tue Jun 05 06:50:44 2007 +0000
@@ -126,7 +126,11 @@
 	}
 	// Else if needed add the parameter to the indenter call string where the config file can be found.
 	else if (useCfgFileParameter != "none") {
+#if defined(Q_OS_WIN32)
 		parameterParameterFile = " " + useCfgFileParameter + "\"" + QFileInfo(dataDirctoryStr).absoluteFilePath() + "/" + configFilename + "\"";
+#else
+        parameterParameterFile = " " + useCfgFileParameter + "\"" + QFileInfo(dataDirctoryStr).absoluteFilePath() + configFilename + "\"";
+#endif
 	}
 
 	// Assemble indenter call string for parameters according to the set order.
@@ -144,10 +148,10 @@
 #if defined(Q_OS_WIN32)
     indentCallString = "\"" + QFileInfo(dataDirctoryStr).absoluteFilePath() + "/" + indenterFileName +".exe\""+ indentCallString;
 #else
-    indentCallString = "\"" + QFileInfo(dataDirctoryStr).absoluteFilePath() + "/" + indenterFileName + "\"" + indentCallString;
+    indentCallString = "#!/bin/bash\n\"" + QFileInfo(dataDirctoryStr).absoluteFilePath() + indenterFileName + "\"" + indentCallString;
 #endif
 
-#if defined(Q_OS_LINUX)
+#ifndef Q_OS_WIN32
     // If no Linux binary exists to run the indenter, use wine to run the Windows exe and test if wine is installed.
     if ( !QFile::exists(dataDirctoryStr + indenterFileName) ) {
         indentCallString = "wine " + indentCallString;
@@ -246,7 +250,7 @@
         return sourceCode;
     }
 
-    // generate the indenter call string either for win32 or other systems
+    // Generate the indenter call string either for win32 or other systems.
 #if defined(Q_OS_WIN32)
     indentCallString = "\"" + QFileInfo(dataDirctoryStr).absoluteFilePath() + "/" + indenterFileName +".exe\""+ indentCallString;
 #else
@@ -261,7 +265,7 @@
     // errors and standard outputs from the process call are merged together
     indentProcess.setReadChannelMode(QProcess::MergedChannels);
 
-#if defined(Q_OS_LINUX)
+#ifndef Q_OS_WIN32
     // if no linux binary exists to run the indenter, use wine to run the windows exe and test if wine is installed
     if ( !QFile::exists(dataDirctoryStr + indenterFileName) ) {
         QProcess wineTestProcess;