1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-11 04:53:56 +00:00

Another freebsd fix

This commit is contained in:
Bryan Roe
2020-06-04 01:14:10 -07:00
parent 0bd84b93b1
commit f82f836b5a
2 changed files with 9 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@@ -336,7 +336,8 @@ function lin_xclip_copy(txt)
ch.stdin.write(' for(i=1;i<NF;++i)');
ch.stdin.write(' {');
ch.stdin.write(' split($i,tokens," ");');
ch.stdin.write(' name=substr($i, length(tokens[1])+3);');
ch.stdin.write(' name=substr($i, length(tokens[1])+2);');
ch.stdin.write(' if(substr(name,1,1)==" ") { name=substr($i, length(tokens[1])+3); }');
ch.stdin.write(' chkname=substr(name,1,6);')
ch.stdin.write(' if(chkname=="xclip(")');
ch.stdin.write(' {');
@@ -567,11 +568,11 @@ switch(process.platform)
});
break;
case 'freebsd':
if (require('fs').existsSync('usr/local/bin/xclip'))
if (require('fs').existsSync('/usr/local/bin/xclip'))
{
module.exports = lin_xclip_copy;
module.exports.read = bsd_xclip_readtext;
Object.defineProperty(module.exports, "xclip", { value: 'usr/local/bin/xclip' });
Object.defineProperty(module.exports, "xclip", { value: '/usr/local/bin/xclip' });
}
else
{