Make sure and change to the script's directory.

This commit is contained in:
Scott Shawcroft 2016-10-31 16:12:35 -07:00
parent 5a6ba07557
commit 0e59344e91

View file

@ -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:]')