Schedule script: combined variable definitions and export statements

(for brevity and clarity).

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent 9ca2a08672
commit cf38aaa0d9
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -361,14 +361,10 @@ TQString Schedule::createScanScript()
ts << "#!/bin/bash" << "\n"; ts << "#!/bin/bash" << "\n";
ts << "HOSTNAME=`hostname`" << "\n"; ts << "export HOSTNAME=`hostname`" << "\n";
ts << "export HOSTNAME" << "\n"; ts << TQString("export PATH=%1").arg(TQString(getenv("PATH"))) << "\n";
ts << TQString("PATH=%1").arg(TQString(getenv("PATH"))) << "\n"; ts << "export DCOPSERVER=`cat ${HOME}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n";
ts << "export PATH" << "\n"; ts << "export DISPLAY=:0" << "\n";
ts << "DCOPSERVER=`cat ${HOME}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n";
ts << "export DCOPSERVER" << "\n";
ts << "DISPLAY=:0" << "\n";
ts << "export DISPLAY" << "\n";
ts << "# Execution starts here" << "\n"; ts << "# Execution starts here" << "\n";
ts << "if [ \"$1\" = \"\" ]; then" << "\n"; ts << "if [ \"$1\" = \"\" ]; then" << "\n";
ts << " exit 1" << "\n"; ts << " exit 1" << "\n";

Loading…
Cancel
Save