From 0e59344e91ef37ce87648ef4b5763fc9af40f774 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 31 Oct 2016 16:12:35 -0700 Subject: [PATCH] Make sure and change to the script's directory. --- update_scripts/update_macosx.command | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update_scripts/update_macosx.command b/update_scripts/update_macosx.command index 23cebad7..2423d4ae 100755 --- a/update_scripts/update_macosx.command +++ b/update_scripts/update_macosx.command @@ -1,5 +1,6 @@ #! /bin/bash -latest_release=$(curl -s "https://api.github.com/repos/adafruit/micropython-adafruit-bundle/releases/latest") +cd $(dirname $0) +latest_release=$(curl -s "https://api.github.com/repos/adafruit/micropython-adafruit-bundle/releases/latest") download_link=$(echo $latest_release | grep -o "\"browser_download_url\": \"[^\"]*" | cut -d \" -f 4) tag=$(echo $latest_release | grep -o "\"tag_name\": \"[^\"]*" | cut -d \" -f 4) current=$(head -n 1 VERSIONS.txt | tr -d '[:space:]')