From 76674c4fd47802a1d48dbf61f88475d47c3f9e75 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 27 Feb 2016 18:35:59 +0100 Subject: [PATCH] Changed: Improve formatting of UNIX script --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 70bb3d73c..c4a11a22a 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -916,6 +916,8 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool contentPrefix += "set RYZOM_CLIENT=\"%1\"\n"; contentPrefix += "set UNPACKPATH=\"%2\"\n"; contentPrefix += "set ROOTPATH=\"%3\"\n"; + contentPrefix += toString("set UPGRADE_FILE=\"%%ROOTPATH%%\\%s\"\n", UpgradeBatchFilename.c_str()); + contentPrefix += "\n"; contentPrefix += "set LOGIN=%4\n"; contentPrefix += "set PASSWORD=%5\n"; contentPrefix += "set SHARDID=%6\n"; @@ -960,15 +962,15 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool } // launch upgrade script if present (it'll execute additional steps like moving or deleting files) - contentSuffix += "if [ -e \"$UPGRADE_FILE\" ]; then chmod +x \"$UPGRADE_FILE\" && \"$UPGRADE_FILE\"; fi\n"; + contentSuffix += "if [ -e \"$UPGRADE_FILE\" ]; then chmod +x \"$UPGRADE_FILE\" && \"$UPGRADE_FILE\"; fi\n\n"; // be sure file is executable - contentSuffix += "chmod +x \"$RYZOM_CLIENT\"\n"; + contentSuffix += "chmod +x \"$RYZOM_CLIENT\"\n\n"; if (wantRyzomRestart) { // change to previous client directory - contentSuffix += "cd \"$ROOTPATH\"\n"; + contentSuffix += "cd \"$ROOTPATH\"\n\n"; // launch new client contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str());