src/js/commands/instrument.js
function () {
            var outputDir = path.join(copyDir, jalangiRuntimeDir);
            mkdirp.sync(outputDir);
            var copyFile = function (srcFile) {
                if (jalangiRoot) {
                    srcFile = path.join(jalangiRoot, srcFile);
                }
                var outputFile = path.join(outputDir, path.basename(srcFile));
                fs.writeFileSync(outputFile, String(fs.readFileSync(srcFile)));
            };
            instUtil.headerSources.forEach(copyFile);
            if (analyses) {
                analyses.forEach(function (f) {
                    var outputFile = path.join(outputDir, path.basename(f));
                    fs.writeFileSync(outputFile, String(fs.readFileSync(f)));
                });
            }
        }
function () {
            var outputDir = path.join(copyDir, jalangiRuntimeDir);
            mkdirp.sync(outputDir);
            var copyFile = function (srcFile) {
                if (jalangiRoot) {
                    srcFile = path.join(jalangiRoot, srcFile);
                }
                var outputFile = path.join(outputDir, path.basename(srcFile));
                fs.writeFileSync(outputFile, String(fs.readFileSync(srcFile)));
            };
            instUtil.headerSources.forEach(copyFile);
            if (analyses) {
                analyses.forEach(function (f) {
                    var outputFile = path.join(outputDir, path.basename(f));
                    fs.writeFileSync(outputFile, String(fs.readFileSync(f)));
                });
            }
        }
function ( ) { var outputDir = path . join ( copyDir , jalangiRuntimeDir ) ; mkdirp . sync ( outputDir ) ; var copyFile = function ( srcFile ) { if ( jalangiRoot ) { srcFile = path . join ( jalangiRoot , srcFile ) ; } var outputFile = path . join ( outputDir , path . basename ( srcFile ) ) ; fs . writeFileSync ( outputFile , String ( fs . readFileSync ( srcFile ) ) ) ; } ; instUtil . headerSources . forEach ( copyFile ) ; if ( analyses ) { analyses . forEach ( function ( f ) { var outputFile = path . join ( outputDir , path . basename ( f ) ) ; fs . writeFileSync ( outputFile , String ( fs . readFileSync ( f ) ) ) ; } ) ; } }
copy the Jalangi runtime files into the directory with
instrumented code, so they can be loaded with relative paths
copy the Jalangi runtime files into the directory with instrumented code so they can be loaded with relative paths