summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2019-03-21 15:26:10 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-26 04:44:08 -0700
commit40dd909c758f3c421f50f1d3b64a0cd1f9754ff1 (patch)
tree1df81dee5fde633a3f2188363b37007609972618
parent9a5a7225737051e9523a775ebf8bba63f144259b (diff)
downloadchrome-ec-40dd909c758f3c421f50f1d3b64a0cd1f9754ff1.tar.gz
flash_fp_mcu: source common script from relative directory
This change makes flash_fp_mcu (which sources flash_fp_mcu_common.sh) work when installed into either /usr/bin or /usr/local/bin. BRANCH=none BUG=chromium:890059 TEST=emerge-nocturne ec-utils-test cros deploy <IP> ec-utils-test dut> flash_fp_mcu -h dut> rm -rf /usr/share/flash_fp_mcu dut> rm /usr/bin/flash_fp_mcu cros deploy --root=/usr/local <IP> ec-utils-test dut> flash_fp_mcu -h Change-Id: I371ce25bf61d216307c7f4e090f0d5b3ce329a74 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1535118 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-xboard/nami_fp/flash_fp_mcu2
-rwxr-xr-xboard/nocturne_fp/flash_fp_mcu2
2 files changed, 2 insertions, 2 deletions
diff --git a/board/nami_fp/flash_fp_mcu b/board/nami_fp/flash_fp_mcu
index 8beff69460..eeb65764d9 100755
--- a/board/nami_fp/flash_fp_mcu
+++ b/board/nami_fp/flash_fp_mcu
@@ -3,7 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-. /usr/share/flash_fp_mcu/flash_fp_mcu_common.sh
+. "$(dirname "$(readlink -f "$0")")"/../share/flash_fp_mcu/flash_fp_mcu_common.sh
# Kabylake PCH GPIOs
readonly KBL_GPIOCHIP="gpiochip360"
diff --git a/board/nocturne_fp/flash_fp_mcu b/board/nocturne_fp/flash_fp_mcu
index f531e399df..42cba3defd 100755
--- a/board/nocturne_fp/flash_fp_mcu
+++ b/board/nocturne_fp/flash_fp_mcu
@@ -3,7 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-. /usr/share/flash_fp_mcu/flash_fp_mcu_common.sh
+. "$(dirname "$(readlink -f "$0")")"/../share/flash_fp_mcu/flash_fp_mcu_common.sh
# Kabylake PCH GPIOs
readonly KBL_GPIOCHIP="gpiochip360"