diff --git a/scripts/shared.js b/scripts/shared.js index 9c4bc69..2004cbd 100644 --- a/scripts/shared.js +++ b/scripts/shared.js @@ -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) { diff --git a/scripts/update-master-firmware.js b/scripts/update-master-firmware.js index 2ea81d2..5829e67 100755 --- a/scripts/update-master-firmware.js +++ b/scripts/update-master-firmware.js @@ -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); diff --git a/scripts/update-slave-firmware.js b/scripts/update-slave-firmware.js index a3c2e99..aab4161 100755 --- a/scripts/update-slave-firmware.js +++ b/scripts/update-slave-firmware.js @@ -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);