From cf38aaa0d9074ffc26414e5ca845137381085164 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Fri, 26 Feb 2021 15:48:07 +0200 Subject: Schedule script: combined variable definitions and export statements (for brevity and clarity). Signed-off-by: Mavridis Philippe --- src/schedule.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/schedule.cpp') diff --git a/src/schedule.cpp b/src/schedule.cpp index 7c38efc..2a89381 100644 --- a/src/schedule.cpp +++ b/src/schedule.cpp @@ -361,14 +361,10 @@ TQString Schedule::createScanScript() ts << "#!/bin/bash" << "\n"; - ts << "HOSTNAME=`hostname`" << "\n"; - ts << "export HOSTNAME" << "\n"; - ts << TQString("PATH=%1").arg(TQString(getenv("PATH"))) << "\n"; - ts << "export PATH" << "\n"; - ts << "DCOPSERVER=`cat ${HOME}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n"; - ts << "export DCOPSERVER" << "\n"; - ts << "DISPLAY=:0" << "\n"; - ts << "export DISPLAY" << "\n"; + ts << "export HOSTNAME=`hostname`" << "\n"; + ts << TQString("export PATH=%1").arg(TQString(getenv("PATH"))) << "\n"; + ts << "export DCOPSERVER=`cat ${HOME}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n"; + ts << "export DISPLAY=:0" << "\n"; ts << "# Execution starts here" << "\n"; ts << "if [ \"$1\" = \"\" ]; then" << "\n"; ts << " exit 1" << "\n"; -- cgit v1.2.1