summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-13 08:39:40 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-13 08:39:40 -0500
commit76e6c88c264cb81f5c5b716811161f1b5e96fc72 (patch)
treedbaca348d7b9e1450adb51d69297182a4f890db4 /tools
parent2d31a424e47f8a90ff75ff0cb8a7a9d5566e90ae (diff)
downloadhorizon-76e6c88c264cb81f5c5b716811161f1b5e96fc72.tar.gz
horizon-76e6c88c264cb81f5c5b716811161f1b5e96fc72.tar.bz2
horizon-76e6c88c264cb81f5c5b716811161f1b5e96fc72.tar.xz
horizon-76e6c88c264cb81f5c5b716811161f1b5e96fc72.zip
Test other tool params; output generator comment in simulator script
Diffstat (limited to 'tools')
-rw-r--r--tools/hscript-simulate/simulator.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/hscript-simulate/simulator.cc b/tools/hscript-simulate/simulator.cc
index 95bdde6..e26735e 100644
--- a/tools/hscript-simulate/simulator.cc
+++ b/tools/hscript-simulate/simulator.cc
@@ -45,15 +45,17 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
+ if(!isatty(1)) {
+ std::cout << "#!/bin/sh" << std::endl << std::endl;
+ }
+ bold_if_pretty(std::cout);
+ if(!isatty(1)) std::cout << "# Generated by ";
+ std::cout << "HorizonScript Simulation Utility version 0.1.0";
+ reset_if_pretty(std::cout);
+ std::cout << std::endl;
if(isatty(1)) {
- bold_if_pretty(std::cout);
- std::cout << "HorizonScript Simulation Utility version 0.1.0";
- reset_if_pretty(std::cout);
- std::cout << std::endl;
std::cout << "Copyright (c) 2019 Adélie Linux and contributors. AGPL-3.0 license." << std::endl;
std::cout << std::endl;
- } else {
- std::cout << "#!/bin/sh" << std::endl << std::endl;
}
my_script = Horizon::Script::load(installfile, opts);