Make the firmware upgrade scripts working directory independent.

This commit is contained in:
László Monda
2017-10-29 19:09:32 +01:00
parent 72b279841c
commit e8ab25493e
3 changed files with 4 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ function getBlhostCmd(pid) {
break;
}
return `../../../lib/bootloader/bin/Tools/blhost/${blhostPath} --usb 0x1d50,${pid}`;
return `${__dirname}/../lib/bootloader/bin/Tools/blhost/${blhostPath} --usb 0x1d50,${pid}`;
}
function execRetry(command) {

View File

@@ -11,7 +11,7 @@ program
.parse(process.argv)
const firmwareImage = program.args[0];
const usbDir = '../../../lib/agent/packages/usb';
const usbDir = `${__dirname}/../lib/agent/packages/usb`;
const blhost = getBlhostCmd(0x6120);
checkFirmwareImage(firmwareImage, extension);

View File

@@ -11,9 +11,9 @@ program
.parse(process.argv)
const firmwareImage = program.args[0];
const usbDir = '../../../lib/agent/packages/usb';
const usbDir = `${__dirname}/../lib/agent/packages/usb`;
const blhostUsb = getBlhostCmd(0x6121);
const blhostBuspal = blhostUsb + ' --buspal i2c,0x10,100k';
const blhostBuspal = `${blhostUsb} --buspal i2c,0x10,100k`;
checkFirmwareImage(firmwareImage, extension);