From 2173cadf23c4b678e1392cdda370b134f741ef8f Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 15 Oct 2019 13:06:46 +0200 Subject: [PATCH] openocd scripts: allow to call them from another dir --- tools/jtag_openocd/openocd_flash_dump.sh | 1 + tools/jtag_openocd/openocd_flash_recovery.sh | 1 + tools/jtag_openocd/openocd_interactive.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/tools/jtag_openocd/openocd_flash_dump.sh b/tools/jtag_openocd/openocd_flash_dump.sh index 497847dd1..650c218f1 100755 --- a/tools/jtag_openocd/openocd_flash_dump.sh +++ b/tools/jtag_openocd/openocd_flash_dump.sh @@ -1,5 +1,6 @@ #!/bin/bash +cd $(dirname "$0") . openocd_configuration || exit 1 if [ -e "$DUMP" ]; then diff --git a/tools/jtag_openocd/openocd_flash_recovery.sh b/tools/jtag_openocd/openocd_flash_recovery.sh index 2e88c52e6..80caa08f0 100755 --- a/tools/jtag_openocd/openocd_flash_recovery.sh +++ b/tools/jtag_openocd/openocd_flash_recovery.sh @@ -1,5 +1,6 @@ #!/bin/bash +cd $(dirname "$0") . openocd_configuration || exit 1 if [ ! -e "$IMAGE" ]; then diff --git a/tools/jtag_openocd/openocd_interactive.sh b/tools/jtag_openocd/openocd_interactive.sh index ea7919da8..ac022f3f2 100755 --- a/tools/jtag_openocd/openocd_interactive.sh +++ b/tools/jtag_openocd/openocd_interactive.sh @@ -1,5 +1,6 @@ #!/bin/bash +cd $(dirname "$0") . openocd_configuration || exit 1 echo "*********************************************"