# HG changeset patch # User thomas_-_s # Date 1211816145 0 # Node ID cb2bed53ad8bd2aa0e6d146ffb8312aa4d55dbca # Parent 0f116c3002d7a64a3d725bd1586434d7b8d31d44 Using a placeholder for the scripts name in the script template, so the call syntax will show the correct name of the script. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@707 59b1889a-e5ac-428c-b0c7-476e01d41282 diff -r 0f116c3002d7 -r cb2bed53ad8b src/mainwindow.cpp --- a/src/mainwindow.cpp Mon May 26 13:05:04 2008 +0000 +++ b/src/mainwindow.cpp Mon May 26 15:35:45 2008 +0000 @@ -1410,7 +1410,11 @@ if ( fileName.isEmpty() ) { return; } + + // Replace placeholder for script name in script template. + indenterCallShellScript = indenterCallShellScript.replace("__INDENTERCALLSTRINGSCRIPTNAME__", fileName); + // Delete any old file, write the new contents and set executable permissions. QFile::remove(fileName); QFile outSrcFile(fileName); outSrcFile.open( QFile::ReadWrite | QFile::Text ); diff -r 0f116c3002d7 -r cb2bed53ad8b src/templateBatchScript.h --- a/src/templateBatchScript.h Mon May 26 13:05:04 2008 +0000 +++ b/src/templateBatchScript.h Mon May 26 15:35:45 2008 +0000 @@ -57,8 +57,8 @@ ":error\n" "echo .\n" "echo ERROR: As parameter given directory or file does not exist!\n" -"echo Syntax is: recurse.bat dirname filesuffix\n" -"echo Syntax is: recurse.bat filename\n" +"echo Syntax is: __INDENTERCALLSTRINGSCRIPTNAME__ dirname filesuffix\n" +"echo Syntax is: __INDENTERCALLSTRINGSCRIPTNAME__ filename\n" "echo Example: recurse.bat temp cpp\n" "echo .\n" "\n" @@ -97,8 +97,8 @@ "__INDENTERCALLSTRING2__\n" "else\n" "echo \"ERROR: As parameter given directory or file does not exist!\"\n" - "echo \"Syntax is: recurse.sh dirname filesuffix\"\n" - "echo \"Syntax is: recurse.sh filename\"\n" + "echo \"Syntax is: __INDENTERCALLSTRINGSCRIPTNAME__ dirname filesuffix\"\n" + "echo \"Syntax is: __INDENTERCALLSTRINGSCRIPTNAME__ filename\"\n" "echo \"Example: recurse.sh temp cpp\"\n" "exit 1\n" "fi\n"