1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-26 21:23:21 +00:00

Updated regex on getLibInfo()

This commit is contained in:
Bryan Roe
2021-01-28 22:35:55 -08:00
parent e932a1ac99
commit 956e735b82
2 changed files with 2 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ function getLibInfo(libname)
child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stderr.on('data', function () { });
child.stdin.write('ls /lib/' + libname + '.*' + " | tr '\\n' '`' | awk -F'`' '{" + ' DEL=""; printf "["; for(i=1;i<NF;++i) { if($1~/((.so)(.[0-9])*)$/) { printf "%s{\\"path\\": \\"%s\\"}",DEL,$1; DEL=","; } } printf "]"; }\'\nexit\n');
child.stdin.write('ls /lib/' + libname + '.*' + " | tr '\\n' '`' | awk -F'`' '{" + ' DEL=""; printf "["; for(i=1;i<NF;++i) { if($1~/((.so)(.[0-9]+)*)$/) { printf "%s{\\"path\\": \\"%s\\"}",DEL,$1; DEL=","; } } printf "]"; }\'\nexit\n');
child.waitExit();
try
{