console.log("sct.js start");
const { exec } = require('child_process');
const fs = require("fs");
const shellCmd = "./sct.sh ";
const stdOutFile = "./sct/std-out";
shellCmd += ["index","scf","cmeditor"].join(" ");
exec(shellCmd, (err, stdout, stderr) => {
if (err) {
fs.writeFileSync("./sct/err", err);
fs.writeFileSync("./sct/std-err", stderr);
} else {
fs.writeFileSync(stdOutFile, stdout);
}
console.log("sct.js done.");
});
npm run sct-"$1"
echo "sct-$1 done"
npm run sct-"$2"
echo "sct-$2 done"
npm run sct-"$3"
echo "sct-$3 done"